split_to_tbl {lightparser} | R Documentation |
Group lines of a Rmd or Qmd file by types in a tibble
Description
Group lines of a Rmd or Qmd file by types in a tibble
Usage
split_to_tbl(file)
Arguments
file |
A Rmd or Qmd file path |
Value
A tibble with 6 columns:
-
type
: type of the part (yaml, heading, inline, block) -
label
: label of the part (if any) -
params
: parameters of the part (if any) -
text
: text of the part (if any) -
code
: code of the part (if any) -
heading
: heading of the part (if any) -
heading_level
: level of the heading (if any) -
section
: section of the Rmd file, according to headings (if any)
Examples
file <- system.file(
"dev-template-parsing.Rmd",
package = "lightparser"
)
split_to_tbl(file)
[Package lightparser version 0.1.0 Index]