listToObjects: listToObjects()

Description Usage Arguments Examples

Description

Turns each element of a list into an object in your global environment with the name of each element in the list becoming the name of that object. By default, the list is deleted at the end, although this behavior may be turned off.

Usage

1
2
listToObjects(myList, deleteList = TRUE, objectNames = NULL,
  overwriteExisting = TRUE, verbose = TRUE)

Arguments

myList

a list

deleteList

TRUE by default, should the list be deleted after?

objectNames

(optional) a vector of object names, one per element in myList. By default, the names of the objects will be the names of myList, which may be viewed via names(myList)

overwriteExisting

TRUE by default, should the function overwrite existing objects whose names are in names(myList) or the objectNames argument?

verbose

TRUE by default, should the function be verbose?

Examples

1
2
jake <- list(a = c(1, 2, 3), b = c(2, 3, 4))
listToObjects(jake)

jakesherman/jakemisc documentation built on May 18, 2019, 9:08 a.m.