Nothing
knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(lightparser)
{lightparser} reads your flat file to detect what is a yaml header,
what is a code chunk and its options, what is a text part.
Function split_to_tbl()
returns a tibble with all these parts.
file <- system.file( "dev-template-parsing.Rmd", package = "lightparser" ) split_to_tbl(file)
You can re-create the Rmd/Qmd file from the tibble returned by split_to_tbl()
.
As this is a tibble, before combining it as a new file, you can modify its content by removing or adding rows, replacing content, etc.
file <- system.file("dev-template-parsing.Rmd", package = "lightparser" ) # split first tbl_rmd <- split_to_tbl(file) # apply your filters tbl_rmd_filtered <- tbl_rmd[-5, ] # combine then combine_tbl_to_file(tbl_rmd_filtered, tempfile(fileext = ".Rmd"))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.