PBSmodelling (version 2.68.8)

setPBSoptions: 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 value is a sublist (list component) of option, this list component can be changed individually using sublist=TRUE.

Author

Alex Couture-Beil, Vancouver Island University, Nanaimo BC

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.

See Also

getPBSoptions, writePBSoptions, readPBSoptions

Examples

Run this code
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"))
})

Run the code above in your browser using DataCamp Workspace