r2mm: Convert R code into FreeMind mind map code

Description Usage Arguments Value Examples

View source: R/wrapper.R

Description

Convert R code into FreeMind mind map code

Usage

1
2
3
4
5
6
7
8
9
r2mm(
  from = NA,
  root = NA,
  md_list = FALSE,
  md_braces = FALSE,
  md_bookdown = FALSE,
  md_eq = FALSE,
  md_maxlevel = ""
)

Arguments

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.

md_list

Logical. whether to process lists like headings in the Markdown input.

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_eq

Logical. Whether to include LaTeX equations in the Markdown input when converted to other formats.

md_maxlevel

Integer or ”. The maximum level of the markdown headings that are displayed in the mind map.

Value

Character, FreeMind mind map code.

Examples

1
2
3
4
5
6
7
8
9
input <- system.file("examples/mindr-r.R", package = "mindr")
input_txt <- readLines(input, encoding = "UTF-8")
output_txt <- r2mm(from = 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

mindr documentation built on Nov. 22, 2021, 9:07 a.m.

Related to r2mm in mindr...