rmarkdown-cookbook icon indicating copy to clipboard operation
rmarkdown-cookbook copied to clipboard

R Markdown Cookbook. A range of tips and tricks to make better use of R Markdown.

Results 80 rmarkdown-cookbook issues
Sort by recently updated
recently updated
newest added

From a question in https://stackoverflow.com/questions/33107908/how-to-tell-if-code-is-executed-within-a-knitr-rmarkdown-context ```r getOption('knitr.in.progress') ``` Mentioned here too https://github.com/yihui/knitr/issues/926#issuecomment-68503962 And was selected as one of stackoverflow snippet: https://github.com/nfultz/stackoverflow/blob/master/R/is.knitr.in.progress.R

I think we could add something about using `knitr::asis_output` as an alternative to `result = 'asis'`, like we did for the `import_example` function https://github.com/yihui/rmarkdown-cookbook/blob/9931f7644fb8a7becde55925da4aaf224321f392/index.Rmd#L59-L67 We did not mentioned it yet...

I just saw the **tablesgg** package this morning from @rrprf: https://github.com/rrprf/tablesgg Drawing tables as graphics is an interesting idea (albeit probably not completely new, e.g. [Figure 12.1 in the knitr...

I think this would benefit to be an example in the book https://github.com/rstudio/bookdown/issues/1037

See discussion in https://github.com/rstudio/rmarkdown/issues/1954#issuecomment-733070556 With this, markdown table will be used, and displayed using bootstrap style by **rmarkdown** ````md --- title: "table format" output: html_document --- ```{r} knitr::kable(iris) ``` ````...

As commented in https://github.com/rstudio/rmarkdown/issues/1956#issuecomment-732658044, we have a recipe that uses `--atx-headers`: https://bookdown.org/yihui/rmarkdown-cookbook/lua-filters.html We should add a not that this argument is deprecated in Pandoc 2.11.2

As a potential topic for v2, I remembered this nice [guide](https://github.com/rstudio/pagedown/pull/81/files) that @RLesur wrote about creating templates for {pagedown}. This in and of itself it perhaps too broad of a...

* Don't mention sys.source() as people shouldn't be using it anyway * Use `local = TRUE` which is simpler and still correct * Precisely describe the problem caused the default...

This follows a question here https://github.com/rstudio/rmarkdown/issues/1911 Basically, Word has Character Style and Paragraphe Style so you need to take care when applying using Pandoc ````md --- title: "testing custom styles...

Considering the similarity, I would mention the possibility to use the special yaml tag `!expr` as an alternative to `knitr`'s inline code (discussed [here](https://github.com/yihui/rmarkdown-cookbook/blob/1d95296/04-content.Rmd#L65-L78)). The former is provided by the...