setPBSoptions {PBSmodelling} | R Documentation |
Set A User Option
Description
Options set by the user for use by other functions.
Usage
setPBSoptions(option, value, sublist=FALSE)
Arguments
option |
name of the option to set. |
value |
new value to assign this option. |
sublist |
if |
Details
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.
Note
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
).
Author(s)
Alex Couture-Beil, Vancouver Island University, Nanaimo BC
See Also
getPBSoptions
, writePBSoptions
,
readPBSoptions
Examples
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"))
})