unlistDF: "Unlist" a 'list' of 'data.frame's to your workspace

Description Usage Arguments Author(s) See Also Examples

Description

Many people like the convenience that a list of data.frames offer; however, some would prefer to have each data.frame as a separate object in their workspace. This function "unlists" a list of data.frames, creating objects named after the list and the list item's names (or index position, if names are not available).

Usage

1
  unlistDF(mylist)

Arguments

mylist

The name of your list object

Author(s)

Ananda Mahto

See Also

unlist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Some example data
## List with named items
qwerty <- list(A = data.frame(A = 1:2, B = 3:4),
           B = data.frame(C = 5:6, D = 7:8))

## List with unnamed items
ytrewq <- list(data.frame(A = 1:2, B = 3:4),
           data.frame(C = 5:6, D = 7:8))

ls(pattern = "qwer|ytre")

unlistDF(qwerty)
unlistDF(ytrewq)

ls(pattern = "qwer|ytre")

mrdwab/AMsnippets documentation built on May 23, 2019, 7:15 a.m.