Create a new directory with a clean RMarkdown file

Description

This function creates a new subdirectory inside the current directory, which will contain a ready-to-use RMarkdown file to be rendered in the given format.

Usage

1
2
create.doc(dirname = "new-doc", format = "html_clean", report = FALSE,
  makefile = TRUE)

Arguments

dirname

name of the directory to create

format

R Markdown format to use

report

indicates if the new document is living in the report directory (for ProjectTemplate projects)

makefile

indicates if a 'Makefile' for HTML and PDF rendering should be created in the document folder

Details

For now on, the available formats are "html_clean", "html_docco".

If report is TRUE, then a small snippet of code is added at the beginning of the Rmd file. This code allows to switch to the ProjectTemplate project root before running load.project when using the included Makefile.

Value

No value is returned.

Author(s)

Julien Barnier <julien.barnier@ens-lyon.fr> This function is heavily inspired and copied from the create.project function of the ProjectTemplate package.

Examples

1
2
3
4
## Not run: 
create.doc("MyDocument", format="html_clean")

## End(Not run)