This function, modified from https://github.com/seifer08ms/Rmarkmap, creates a markmap widget using htmlwidgets. The widget can be rendered on HTML pages generated from R Markdown, Shiny,or other applications.

markmap(root = NA, input = c(".md", ".Rmd", ".mm"), path = ".",
    remove_curly_bracket = FALSE, width = NULL, height = NULL, elementId = NULL,
    options = markmapOption(preset = "colorful"), bookdown_style = TRUE,
    method = c("regexpr", "pandoc"))

Arguments

root

character. a string displayed as the root of the mind map

input

character, The format of theinput files

path

character. The path of the folder which contains the input file(s).

remove_curly_bracket

logical. Whether to remove #ID in the headers of the markdown file (usually in a 'bookdown' https://github.com/rstudio/bookdown project).

width

the width of the markmap

height

the height of the markmap

elementId

character.

options

the markmap options

bookdown_style

logical. whether the markdown files are in bookdown style, i.e. index.Rmd at the beginning, # (PART), # (APPENDIX) and # References as an upper level of normal # title

method

"regexpr" uses regular expressions, 'pandoc' uses pandoc to find the headings.

Value

A HTML widget object rendered from a given document.

Examples

path <- system.file("examples/md", package = "mindr") markmap(path = path) markmap(path = path, remove_curly_bracket = TRUE)