to_document: Convert R Notebook to 'html_document'

View source: R/to_document.R

to_documentR Documentation

Convert R Notebook to html_document

Description

Copies a file using fs::file_copy() and changes the output type in the yaml front matter from html_notebook to html_document, removing all other output types.

Usage

to_document(file_path, new_path, overwrite = FALSE)

Arguments

file_path

Path to the source file

new_path

Path to copy the converted file using fs::file_copy()

overwrite

Overwrite file if it exists, passed to fs::file_copy()

Value

Path to new file

See Also

build_analysis_site()

Examples

## Not run: 
to_document("notebook.Rmd", "document.Rmd")
to_document("notebooks_dir/notebook.Rmd", "documents_dir")

## End(Not run)

jabenninghoff/rdev documentation built on April 26, 2024, 5:11 a.m.