runscript | R Documentation |
Run a script associated with a particular chapter
runscript(x, method = c('run', 'copy', 'view', 'show', 'dir'),
ask = TRUE, fmt = "ch%02d.R", package = "FinTS",
subdir = "scripts", lib.loc = NULL)
x |
an object to identify a file in package/subdir via
For example, the default 'fmt' translates CAUTION: Under some systems like ESS (Emacs Speaks Statistics)
under Windows, pop-up menus such as produced by |
method |
One of the following:
Partial matching is allowed. |
ask |
logical: Should |
fmt |
a format to be used with 'x' in sprintf to create the name of a file in lib.loc/package/subdir. |
subdir |
subdirectory of package containing a file of the name constructed
via |
package |
Name of a package with subdirectory 'subdir'. |
lib.loc |
NULL or character string identifying the location where
|
similar to demo or example
the full path and filename, invisibly unless method == 'dir'
Gabor Grothendieck and Spencer Graves
demo
,
sprintf
,
system.file
,
package.dir
,
Stangle
,
vignette
,
example
## Not run:
# provide a menu
runscript()
# run R/library/FinTS/scripts/ch01.R
runscript(1)
# same as:
runscript(1, "run")
# make a copy as 'ch01.R' in the working directory
runscript(1, 'copy')
# display on console only
runscript(1, 'view')
# display using file.show
runscript(1, 'show')
# where is it?
runscript(1, 'dir')
# run R/library/nlme/scripts/afda-ch01.R
if(require(fda))
runscript(1, fmt = "afda-ch%02d.R", package = "fda")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.