Convert (R) Markdown-syntax text to FreeMind mind map code
md2mm(
from = NA,
root = "mindr",
md_list = FALSE,
md_braces = FALSE,
md_bookdown = FALSE,
md_eq = FALSE,
md_maxlevel = ""
)
Character. The source text of the (R) Markdown syntax text, the R code, the FreeMind mind map code, or the path to the directory.
Character. The string displayed as the root (center) of the mind map.
Logical. whether to process lists like headings in the Markdown input.
Logical. Whether the R Markdown syntax text is in bookdown style, i.e. # (PART), # (APPENDIX)
, and # References
as an upper level of the Level 1 heading.
Logical. Whether to include LaTeX equations in the Markdown input when converted to other formats.
Integer or ''. The maximum level of the markdown headings that are displayed in the mind map.
FreeMind mind map code, which can be saved as a .mm file and viewed by common mind map software, such as FreeMind and XMind.
# NOT RUN {
input <- system.file("examples/mindr-md.Rmd", package = "mindr")
input_txt <- readLines(input, encoding = "UTF-8")
output_txt <- md2mm(input_txt)
output <- tempfile(pattern = "file", tmpdir = tempdir(), fileext = ".mm")
writeLines(output_txt, output, useBytes = TRUE)
# file.show(input) # Open the input file file.show(output) # Open the output
# file
message("Input: ", input, "\nOutput: ", output)
# file.remove(output) # remove the output file
# }
Run the code above in your browser using DataLab