Learn R Programming

dMod (version 0.3.2)

exmpextr: Extract an example from a unit test file.

Description

Extract an example from a unit test file.

Usage

exmpextr(test, testPath = NULL, examplePath = NULL)

Arguments

test

File name of the test file, source.

testPath

Path to test files. Defaults to "inst/tests".

examplePath

Path under which the example is stored. Defaults to "inst/examples".

Details

From test, an example is extracted and written to a file of the same name, but with removed "test-". The file is saved under examplePath. The special tag #-! can be used to hide code in the test which is enabled again in the example.