Create a few directories that try to mimic a real
data-analysis project structure, and add a data file and a simple R script
ezspin) or Rmarkdown file (for
After setting up these files and directories, you can run
commands and their equivalent
knitr commands to compare and see the
benefits of using
More specific instructions on how to interact with this test directory will be printed to the console.
1 2 3
The path to the test directory.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
## Not run: library(ezknitr) # setup the test directory structures and run naive spin setup_ezspin_test() knitr::spin("ezknitr_test/R/ezspin_test.R") file.remove(c("ezspin_test.md", "ezspin_test.html")) # setup the test directory structures and run simple ezspin setup_ezspin_test() ezspin("R/ezspin_test.R", wd = "ezknitr_test") # setup the test directory structures and run ezspin with more parameters tmp <- setup_ezspin_test() ezspin("R/ezspin_test.R", wd = "ezknitr_test", out_dir = "output", fig_dir = "coolplots") unlink(tmp, recursive = TRUE, force = TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.