make_example: Create examples in working directory

View source: R/make_example.R

make_exampleR Documentation

Create examples in working directory

Description

Each package based on a dmdScheme can contain examples. This function is the interface to these examples. In the package dmdScheme, no examples are included. The function has two basic usages:

  1. by using make_example(schemeName = "NameOfTheScheme") all included examples are listed

  2. by using make_example(name = "basic", schemeName = "NameOfTheScheme") it will create the example named basic in a subdirectory in the current working directory. An existing directory with the same name, will nod be overwritten!

Usage

make_example(name)

Arguments

name

name of the example

Details

The examples have to be located in a directory called example_data. The function is doing two things:

  1. Copying the complete directory from the example_data directory to the current working directory

  2. running knitr::purl on all ./code/*.Rmd to extract the code into .R script files. If you want to include an RMarkdown files in the ./code directory from thisa, use the .rmd extension (small letters).

Value

invisibly NULL

Examples

make_example()
## Not run: 
make_example("basic")

## End(Not run)

dmdScheme documentation built on Aug. 22, 2022, 9:06 a.m.