_dev/dev_doc.R

# dev_doc.R


# Generate README in _doc automatically for package cargo.


# Packages ---------------------------------------------------------------------


library(rmarkdown)


# Generate new README in _doc --------------------------------------------------


# The README is a CommonMark version of the RMarkdown vignette
# "A primer to package cargo". The HEADER.md file in vignettes/ is included
# before the body so that the generated README file has a proper Markdown title.


rmarkdown::render(
    input         = file.path("vignettes", "cargo_primer.Rmd"),
    output_format = rmarkdown::md_document(
        variant   = "commonmark",
        includes  = rmarkdown::includes(
            before_body = "HEADER.md"
        )
    ),
    output_file = "README.md",
    output_dir  = "_doc"
)
jeanmathieupotvin/cargo documentation built on Oct. 27, 2020, 5:22 p.m.