copyRmd: copy an R markdown file, optionally removing yaml frontmatter

Description Usage Arguments Details

View source: R/copyRmd.R

Description

For building bookdown books, the markdown header information usually present in an Rmd file or a vignette causes problems. This function makes a copy of the Rmd, but removes any yaml header information (specified by '^—' regex).

Usage

1
copyRmd(srcfile, destfile = basename(srcfile), remove.yaml = TRUE)

Arguments

srcfile

character(1) filename

destfile

character(1) filename

remove.yaml

logical(1) when copying, remove yaml header metadata?

Details

If srcfile and destfile are the same, the src file is overwritten.


seandavi/CollaborativeBookdown documentation built on Aug. 22, 2019, 4:48 a.m.