Description Usage Arguments Value Examples
Display a directory hierarchical structure in Markdown syntax
1 |
from |
Character. The source text of the (R) Markdown syntax text, the R code, the FreeMind mind map code, or the path to the directory. |
dir_files |
Logical. Whether to include files. If |
dir_all |
Logical. Whether to include all files in a directory. If |
dir_excluded |
Character. The directories which are not included in the output. |
Character, in Markdown syntax.
1 2 3 4 5 6 7 8 9 | input <- system.file(package = "mindr")
dir2md(input)
dir2md(input, dir_files = FALSE, dir_all = TRUE, dir_excluded = "Meta")
output_txt <- dir2md(input)
output <- tempfile(pattern = "file", tmpdir = tempdir(), fileext = ".Rmd")
writeLines(output_txt, output, useBytes = TRUE)
message("Input: ", input, "\nOutput: ", output)
# file.show(output) # Open the output file file.remove(output) # remove the
# output file
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.