for.setattr: Add tskey attribute to every data.frame in a list of...

Description Usage Arguments Author(s) Examples

Description

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

Usage

1
  for.setattr(li, key = "tskey")

Arguments

li

named list of data.frames

Author(s)

Matthias Bannert

Examples

 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

mbannert/gateveys documentation built on May 21, 2019, 2:23 p.m.