setPBSoptions | R Documentation |
Options set by the user for use by other functions.
setPBSoptions(option, value, sublist=FALSE)
option |
name of the option to set. |
value |
new value to assign this option. |
sublist |
if |
Objects can be placed into the PBS options manager (see PBSoptions-class
).
If the user wishes to change the object associated with an option, issue the command:
setPBSoptions("someOldOption",someNewOption)
If an option comprises a list object, a user can alter specific components of the list
by activating the sublist
argument:
setPBSoptions(option="myList", value=list(gamma=130), sublist=TRUE)
See example below.
A value .PBSmod$.options$.optionsChanged
is set to TRUE
when an option is changed,
so that the user doesn't always have to be prompted to save the options file.
By default, .PBSmod$.options$.optionsChanged
is not set or NULL
.
Also, if an option is set to ""
or NULL
then it is removed.
.initPBSoptions()
is now called first (options starting with a dot "."
do not set .optionsChanged
).
Alex Couture-Beil, Vancouver Island University, Nanaimo BC
getPBSoptions
, writePBSoptions
,
readPBSoptions
local(envir=.PBSmodEnv,expr={
myList=list(alpha=1,beta=2,gamma=3,delta=4)
setPBSoptions(option="myList", myList)
cat("Original myList:\n---------------\n")
print(getPBSoptions("myList"))
setPBSoptions(option="myList", value=list(gamma=130), sublist=TRUE)
cat("Revised myList:\n--------------\n")
print(getPBSoptions("myList"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.