A roxygen comment is an R comment that starts with #'. Roxygen comments will be treated as normal text. If you want granular control over the elements in the report, below are a few syntax rules to help you: You will see all text and graphical output in the report. This function is what Dean Attali called knitr’s best hidden gem. When rendering an R script to a report, the function knitr::spin() is called to convert the R script to an Rmd file first. If you use the RStudio IDE, the keyboard shortcut to render R scripts is the same as when you knit Rmd documents ( Ctrl / Cmd + Shift + K). That is, you can render a pure R script to a report directly. Dean Attali called it “ knitr’s best hidden gem”. 17.7 Organize an R Markdown project into a research website with workflowrĮven if you are a long-time R Markdown user, you may have missed another possibility.17.6 Collaborate on Rmd documents through Google Drive with trackdown.17.3 Render R Markdown with rmarkdown::render().16.9 Write books and long-form reports with bookdown.16.8 R Markdown templates in R packages.16.6 The working directory for R code chunks.16.3 Read multiple code chunks from an external script (*).16.2 Read external scripts into a chunk.15.9.1 Generate data in R and read it in Asymptote.15.6.3 Write YAML data to a file and also display it.15.6.2 Include LaTeX code in the preamble.15.6 Write the chunk content to a file via the cat engine.15.3 Execute content conditionally via the asis engine.15.2 Run Python code and interact with Python.15.1 Register a custom language engine (*).14.9.3 Keep multiple copies of the cache.14.9.2 Invalidate the cache by changes in global variables.14.9.1 Invalidate the cache by changing code in the expression.14.9 A more transparent caching mechanism.14.8 Allow duplicate labels in code chunks (*).14.7 Use knitr::knit_expand() to generate Rmd source.14.6 Save a group of chunk options and reuse them (*).14.5 Modify a plot in a previous code chunk.14.4 Generate a plot and display it elsewhere.14.2 Use an object before it is created (*).14.1.2 Use the same chunk label in another chunk.14.1.1 Embed one chunk in another chunk (*).13.5 Embed an interactive 3D plot with rgl.13.4 Show the chunk header in the output.13.3 Report how much time each chunk takes to run.12.5 Output figures in the HTML5 format.11.17 Customize the printing of objects in chunks (*).11.16 Step-by-step plots with low-level plotting functions (*).11.13 Add attributes to text output blocks (*).11.12 Remove leading hashes in text output.11.11 Output text as raw Markdown content (*).11.9 Collapse text output blocks into source blocks.11.7 Hide code, text output, messages, or plots.11.5 Cache a code chunk for multiple output formats.11.3 Multiple graphical output formats for the same plot.10.3 Other packages for creating tables.10.2.4 Scaling down wide tables in LaTeX.10.1.9 Generate multiple tables from a for-loop (*).8.2 The two-way workflow between R Markdown and Word.7.14 Improve accessibility of HTML pages.7.10 Include the content of an existing HTML file (*).7.8 Embed arbitrary files in the HTML output file.7.7 Embed the Rmd source file in the HTML output file.7.5 Fold all code blocks but show some initially.6.10 Use a custom Pandoc LaTeX template (*).6.7 Render documents containing Unicode characters.5.6.1 Show a verbatim inline expression.5.1.1 Using an R function to write raw HTML or LaTeX code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |