rres_knit_solutions_date | R Documentation |
This function assumes the YAML header of an R Markdown file uses a parameter called solutions, params: solutions which has two values, TRUE and FALSE. The file may use this parameter to adjust the r markdown chunk options such as eval or echo when rendering to output the solutions to exercises or not.
rres_knit_solutions_date(input, ...)
input |
text: the name of the file to be rendered |
... |
text: other parameters to be passed to the render function |
The function may be placed in the YAML header of an R Markdown document where it will be invoked on the first output type.
See Rmarkdown Cookbook Section 17.5 as a reference https://bookdown.org/yihui/rmarkdown-cookbook/custom-knit.html
creates two output files in the default directory. both have the current date appended to the file name. One has no solutions in the output and the second has solutions and the word solutions in the output file name.
# Use the following YAML setting after removing the leading comment
# knit: rresutils::rres_knit_solutions_date
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.