Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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")

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.

Value

A character vector of unpacked variable names.

Author(s)

Alex Couture-Beil, Vancouver Island University, Nanaimo BC

See Also

Examples

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

PBSmodelling

GUI Tools Made Easy: Interact with Models and Explore Data

v2.68.8
GPL (>= 2)
Authors
Jon T. Schnute [aut], Alex Couture-Beil [aut], Rowan Haigh [aut, cre], Nicholas Boers [ctb], Anisa Egeli [ctb], A. R. Kronlund [ctb], Steve Martell [ctb], Norm Olsen [ctb]
Initial release
2019-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.