Description Usage Arguments Details Value Examples
Create a mind map in HTML widget
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | markmap(
from = ".",
root = NA,
input_type = c("auto", "markdown", "mindmap", "R", "dir"),
md_list = FALSE,
md_eq = FALSE,
md_braces = FALSE,
md_bookdown = FALSE,
md_maxlevel = "",
dir_files = TRUE,
dir_all = TRUE,
dir_excluded = NA,
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. |
root |
Character. The string displayed as the root (center) of the mind map. |
input_type |
Character. The type of the input text. It can be |
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. |
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. |
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 |
This function, adapted from the Rmarkup package, creates a markmap widget using htmlwidgets. The widget can be rendered on HTML pages generated from R Markdown, Shiny,or other applications.
HTML widget object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Display Markdown:
input <- system.file("examples/mindr-md.Rmd", package = "mindr")
# file.show(input)
input_txt <- readLines(input, encoding = "UTF-8")
markmap(input_txt)
markmap(input_txt, root = basename(input), md_list = TRUE, md_eq = FALSE,
md_braces = FALSE, md_bookdown = TRUE)
# Display Mind Map:
input <- system.file("examples/mindr-mm.mm", package = "mindr")
# file.show(input)
input_txt <- readLines(input, encoding = "UTF-8")
markmap(input_txt)
markmap(input_txt, root = basename(input))
# Display R script:
input <- system.file("examples/mindr-r.R", package = "mindr")
# file.show(input)
from <- input_txt <- readLines(input, encoding = "UTF-8")
markmap(input_txt)
markmap(input_txt, root = basename(input), md_list = TRUE, md_eq = FALSE,
md_braces = FALSE, md_bookdown = TRUE)
# Display directory:
input <- system.file(package = "mindr")
markmap(input)
markmap(input, root = "The mindr package", dir_files = FALSE, dir_excluded = c("Meta",
"htmlwidgets/lib"), widget_elementId = "mindr-dir")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.