Description Usage Arguments Author(s) Examples
This function appends an attribute named tskey to every data.frame in a given named list of data.frames. List names are used as tskey values. This small function could also be integrated to the big linearize function
1 | for.setattr(li, key = "tskey")
|
li |
named list of data.frames |
Matthias Bannert
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # first create a nested list
nestedList <- list(A=list(a=c(1,2,3),b=c(3,2,1)),
B=list(a=c(4,5,6),
b=c(7,8,9),
d=list(a1="test",
b2="anther test")
))
# call the linearize function for lists
linearList <- linearizeNestedList(nestedList)
# set the attribute "tskey" to to every list element based on its name
for.setattr(linearList)
linearList
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.