Description Usage Arguments Details Value See Also
Given one or more file names, returns the corresponding paths to files in the "Examples" subdirectory of a package. With the names argument missing, returns the names of all such files.
1 | exampleFiles(names = character(), where = "SoDA", oneFile = FALSE, path = TRUE)
|
names |
Either character string names or page numbers matched against the file names defined by the second argument. See details below. |
where |
The name of the package containing the
|
oneFile |
If |
path |
If |
In any call, argument names can be a vector of character
string names, expected to match files in the directory of examples.
The names may match only the leading part of the file name; in
particular, it will often be the case that the actual file name has
a suffix such as ".R", omitted in the names argument.
If the argument where is a package name, then that
package is expected to have a directory named "Examples", as
does this package. In all other circumstances, this argument must
itself be the path name of a directory containing the example files.
In the case of a package, if the package has a data frame object
named examplePages, that object will be used to match page
numbers of a document on which the examples appear. In the default
case, the document is the book Software for Data Analysis.
If you see an example in the book that appears to be the output from
running some R code, enter the page number on which the output
starts as the names argument. Often (though not always) the
corresponding R code is one of the files in the Examples
directory of the package. Some other files, such as source in other
languages or related data, are also provided
corresponding to examples.
Note that the same use of page numbers applies in calls to
runExample or demoExample.
Names for the matching files, or for all such files if names was missing.
runExample to run such files, and
demoExample to run them as interactive demos.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.