Displays template examples defined in Example
section. Handy to check out what template does and how
does it look like once it's rendered. If multiple
examples are available, and index argument is
NULL, you will be prompted for input. If only one
example is available in the header, user is not prompted
for input action, and given template is evaluated
automatically. At any time you can provide an integer
vector with example indices to index argument, and
specified examples will be evaluated without prompting,
thus returning a list of rapport objects. Example
output can be easily exported to various formats (HTML,
ODT, etc.) - check out documentation for
tpl.export for more info.
Usage
tpl.example(fp, index = NULL, env = .GlobalEnv)
Arguments
fp
a template file pointer (see
tpl.find for details)
index
a numeric vector indicating the example
index - meaningful only for templates with multiple
examples. Accepts vector of integers to match IDs of
template example. Using 'all' (character string) as index
will return all examples.
env
an environment where example will be evaluated
(defaults to .GlobalEnv)