Set A User Option

Share:

Description

Options set by the user for use by other functions.

Usage

1
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.

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:

1
setPBSoptions("someOldOption",someNewOption)

If an option comprises a list object, a user can alter specific components of the list by activating the sublist argument:

1
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

1
2
3
4
5
6
7
8
9
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"))
})

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.