openExamples {PBSmodelling} | R Documentation |
Open examples from the examples subdirectory of a given package.
openExamples(package, prefix, suffix)
package |
name of the package that contains the examples. |
prefix |
prefix of the example file(s). |
suffix |
character vector of suffixes for the example files. |
Copies of each example file are placed in the working directory and opened. If files with the same name already exist, the user is prompted with a choice to overwrite.
To use this function in a window description file, the
package
, prefix
and suffix
arguments must
be specified as the action of the widget that calls
openExamples
. Furthermore, package
, prefix
,
and each suffix
must be separated by commas. For example,
action=myPackage,example1,.r,.c
will copy example1.r
and example2.c
from the examples
directory of the
package myPackage to the working directory and open these
files. If the function was called by a widget, a widget named
prefix
will be set to the specified prefix.
If all the required arguments are missing, it is assumed that the function is being called by a GUI widget.
openFile
, openProjFiles
,
openPackageFile
## Not run: # Copies example1.c and example2.r from the examples directory in # myPackage to the working directory, and opens these files openExamples("myPackage", "example1", c(".r", ".c")) ## End(Not run)