mmm: Convert almost any file into mind map.

Description Usage Arguments Details Value Examples

View source: R/experimental.R

Description

Convert almost any file into mind map.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
mmm(
  input_file = NA,
  output_type = c("widget", "mindmap", "markdown"),
  root = NA,
  md_list = FALSE,
  md_eq = FALSE,
  md_braces = FALSE,
  md_bookdown = FALSE,
  md_maxlevel = "",
  r_seclabel = " --------",
  r_chunkheading = FALSE,
  widget_name = NA,
  widget_width = NULL,
  widget_height = NULL,
  widget_elementId = NULL,
  widget_options = markmapOption(preset = "colorful")
)

Arguments

input_file

Character. The path to the file for input.

output_type

Character. The type of the output. It can be 'widget', 'mindmap', 'markdown', 'R', 'dir'. The default value is 'widget'.

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. # (PART), # (APPENDIX), and # References as an upper level of the Level 1 heading.

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.

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 markmapOption() function.

Details

The input file type could be .md, .Rmd, .R, .mm, .pdf, .docx, .html, .rtf, .odt, .epub, .tex, and any other types which pandoc can convert from. See pandoc for more details.

Value

Desired output.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# pdf: here we use the pdf files in the R installation
input <- file.path(R.home(), "doc/manual/R-intro.pdf")
mmm(input)
input <- file.path(R.home(), "doc/manual/R-data.pdf")
mmm(input, root = "R-data", md_maxlevel = 2)

# MS Word: here we use a .docx document shipped by the 'officer' package input
# <- system.file('doc_examples/example.docx', package = 'officer') mmm(input)

# HTML: here we use the R-FQA webpage
input <- file.path(R.home(), "doc/html/rw-FAQ.html")
mmm(input)

pzhaonet/mindr documentation built on Nov. 23, 2021, 7:24 p.m.