| mm | R Documentation |
All-in-one wrapper for the conversion between (R) Markdown, FreeMind mind map, Mermaid mind map, R code, directory structure, and HTML widget.
mm(
from = NA,
input_type = c("auto", "markdown", "mindmap", "R", "dir"),
output_type = c("widget", "mindmap", "markdown", "R", "dir", "mermaid"),
root = NA,
md_list = FALSE,
md_eq = FALSE,
md_braces = FALSE,
md_bookdown = FALSE,
md_maxlevel = "",
r_seclabel = " --------",
r_chunkheading = FALSE,
dir_files = TRUE,
dir_all = TRUE,
dir_excluded = NA,
dir_to = NA,
dir_quiet = FALSE,
mmd_shape = c("cloud", "rounded_square", "square", "bang", "circle", "hexagon"),
widget_name = NA,
widget_width = NULL,
widget_height = NULL,
widget_elementId = NULL,
widget_options = markmapOption(preset = "colorful")
)
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. |
input_type |
Character. The type of the input text. It can be |
output_type |
Character. The type of the output. It can be |
root |
Character. The string displayed as the root (center) of the mind map. |
md_list |
Logical. whether to process lists like headings in the Markdown input. |
md_eq |
Logical. Whether to include LaTeX equations in the Markdown input when converted to other formats. |
md_braces |
Logical. Whether to remove #ID in the headings of the markdown file (usually in a bookdown> project. |
md_bookdown |
Logical. Whether the R Markdown syntax text is in bookdown style, i.e. |
md_maxlevel |
Integer or ”. The maximum level of the markdown headings that are displayed in the mind map. |
r_seclabel |
Character. The ending characters indicating sections in R Markdown. |
r_chunkheading |
Logical. Whether process the chunk label as headings. |
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. |
dir_to |
Character. The path of the output directory. |
dir_quiet |
Logical. Whether to display the results of generated directories. |
mmd_shape |
Character. The shape of mermaid mindmap nodes. See Mermaid document. |
widget_name |
Character. The name of the html widget. |
widget_width |
Numeric. The width of the widget. |
widget_height |
Numeric. The height of the widget. |
widget_elementId |
Character. The ID of teh Widget. |
widget_options |
List. Options for the markmap widget. It should be a list passed from the |
mm() converts between (R) Markdown syntax text, R code, FreeMind mind map code, Mermaid mind map code, and directory, and display them in a HTML widget. It is a wrapper for other conversion functions in this package.
Desired output.
input <- system.file('examples/mindr-md.Rmd', package = 'mindr')
input_txt <- readLines(input, encoding = 'UTF-8')
mm_output <- mm(input_txt, output_type = c('mindmap', 'markdown', 'R', 'widget'))
mm_output
# See the vignette for more examples:
vignette('mindr', package = 'mindr')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.