PBSmodelling (version 2.68.8)

unpackList: Unpack List Elements into Variables

Description

Make local or global variables (depending on the scope specified) from the named components of a list.

Usage

unpackList(x, scope="L")

Value

A character vector of unpacked variable names.

Arguments

x

named list to unpack.

scope

If "L", create variables local to the parent frame that called the function. If "P", create variables in the temporary package workspace called .PBSmodEnv. If "G", create global variables.

Author

Alex Couture-Beil, Vancouver Island University, Nanaimo BC

See Also

packList, readList, writeList

Examples

Run this code
local(envir=.PBSmodEnv,expr={
  x <- list(a=21,b=23);
  unpackList(x);
  print(a);
})

Run the code above in your browser using DataLab