create_course_document: Create a course document

Description Usage Arguments Details

Description

create_course_document assumes that psPkgPath is a directory that contains an R-package. By default the new document is created in subdirectory "vignettes". If this subdirectory does not exist, it is created. The document is generated by the function rmarkdown::draft using the template "pdf_document".

Usage

1
2
3
create_course_document(psDocuName, psPkgPath = ".",
  psRmdTemplate = "pdf_document", psTemplatePkg = "rcoursetools",
  psDocuSubdir = "vignettes", pbCreateSubdir = TRUE, pbEdit = TRUE)

Arguments

psDocuName

name of the new document

psPkgPath

path where package is located under which document should be created

psRmdTemplate

name of the template to be used

psTemplatePkg

package from where the template should be taken

psDocuSubdir

subdirectory in which document should be saved to

pbCreateSubdir

should new document be put in a separate subdirectory

pbEdit

directly open newly created document

Details

The basic functionality follows the function devtools::use_vignette, except for the possibility of specifying any given template from any package. The template can be specified via argument "psRmdTemplate". This requires in the package given by psTemplatePkg that a subdirectory with the name of the template exists under "rmarkdown/templates". More information about setting up custom templates is obtained in the helpfile of rmarkdown::draft.


charlotte-ngs/rcoursetools documentation built on May 13, 2019, 3:34 p.m.