dir2mm: Display hierarchical structure of a directory in FreeMind...

Description Usage Arguments Value Examples

View source: R/wrapper.R

Description

Display hierarchical structure of a directory in FreeMind mind map

Usage

1
2
3
4
5
6
7
8
dir2mm(
  from = ".",
  root = NA,
  dir_files = TRUE,
  dir_all = TRUE,
  dir_excluded = NA,
  md_maxlevel = ""
)

Arguments

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.

root

Character. The string displayed as the root (center) of the mind map.

dir_files

Logical. Whether to include files. If FALSE, only folders are included. If TRUE, folders and files are included.

dir_all

Logical. Whether to include all files in a directory. If FALSE, only the names of visible files are included (following Unix-style visibility, that is files whose name does not start with a dot). If TRUE, all file names will be included.

dir_excluded

Character. The directories which are not included in the output.

md_maxlevel

Integer or ”. The maximum level of the markdown headings that are displayed in the mind map.

Value

FreeMind mind map code.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
input <- system.file(package = "mindr")
dir2mm(input)
dir2mm(input, dir_files = FALSE, dir_all = TRUE, dir_excluded = "Meta")

output_txt <- dir2mm(input)
output <- tempfile(pattern = "file", tmpdir = tempdir(), fileext = ".mm")
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

mindr documentation built on Nov. 22, 2021, 9:07 a.m.

Related to dir2mm in mindr...