BookEx {FRAPO} | R Documentation |
Utility functions for handling book examples
Description
Utility functions for returning a list of the included examples and displaying, executing, saving and editing the example codes are provided.
Usage
listEx()
showEx(Example)
saveEx(Example)
editEx(Example, ...)
runEx(Example, ...)
Arguments
Example |
|
... |
Ellipsis argument. See details. |
Details
The ellipsis arguments in the function editEx()
are passed down
to the function file.edit()
. If the option editor
is
unset and/or a different editor shall be employed for openening the
example code, then the ellipsis argument can be utilised by
editor = "foo"
, wherey foo
is the name of the editor to
be used.
The ellipsis arguments in the function runEx()
are passed down
to the function source()
.
Value
listEx
Returns a character vector of the examples' names.
showEx
Returns the example of of Example
to the console.
saveEx
Returns a logical
whether the saving of the R code example into
the working directory was successful.
editEx
Opens a copy of the example code in an editor.
runEx
Executes the example code.
Author(s)
Bernhard Pfaff
See Also
Examples
## Not run:
listEx()
showEx(Example = "Part1Chapter3Ex2")
saveEx(Example = "Part1Chapter3Ex2")
runEx(Example = "Part1Chapter3Ex2", echo = TRUE)
editEx(Example = listEx()[1], editor = "emacs")
## End(Not run)