Description Usage Arguments Details Value Author(s) See Also Examples
Run a script associated with a particular chapter
1 2 3 |
x |
an object to identify a file in package/subdir via sprintf(fmt, x). For example, the default 'fmt' translates x = 2 into 'ch02.R'. If no 'x' is specified, a directory of options is provided. CAUTION: Under some systems like ESS (Emacs Speaks Statistics) under Windows, pop-up menus such as produced by 'runscript()' may not work properly. |
method |
One of the following:
Partial matching is allowed. |
ask |
logical: Should 'par(ask=TRUE)' should be called before graphical output happens from the scruot? |
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 sprintf(fmt, x) |
package |
Name of a package with subdirectory 'subdir'. |
lib.loc |
NULL or character string identifying the location where 'system.file(subdir, package, lib.loc)' will find the folder containing the file identified via sprintf(fmt, x) |
similar to demo or example
the full full path and filename, invisibly unless method == 'dir'
Gabor Grothendieck and Spencer Graves
demo
sprintf
system.file
package.dir
Stangle
vignette
example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## 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
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.