View source: R/vignette_to_dir.R
vig_to_dir | R Documentation |
Vignettes are documentation of packages in a paper-like format. The vignettes
can be created using the function usethis::use_vignettes()
. This creates
a new RMarkdown (Rmd) document in the subdirectory 'vignettes'. So far it is not possible
to group different documents in separate directories. This function creates for
each Rmd document a separate directory and moves the Rmd document into that subdirectory.
vig_to_dir(
pvec_rmd_doc = list.files(file.path(here::here(), "vignettes"), pattern = ".Rmd$"),
ps_trg_dir = file.path(here::here(), "vignettes")
)
pvec_rmd_doc |
Rmd document to be moved. By default all Rmd files in directory 'vignettes' are moved |
ps_trg_dir |
alternative root target directory, by default: file.path(here::here(), "vignettes") |
The creation of the new subdirectory and the move of the created Rmd document done using functions from package 'fs'.
## Not run:
usethis::use_vignettes("example-vignette")
vig_to_dir("vignettes/example-vignette.Rmd")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.