tableList: tableList constructor

Description Usage Arguments Value See Also Examples

Description

tableList constructor, creates tableList object from a data.frame or a data.table and from aid data. The goal is to wrap data.table and any additional data structures together. tableList behaves like a data.table object. Groups of attributes can be stored together via dataType.

Usage

1
tableList(tabData, aidData = list(), dataType = NULL)

Arguments

tabData

A data.frame or a data.table.

aidData

Aid structures, generally in the form of a list.

dataType

Named list. Contains names of groups of attributes, elements are attributes which belong to the group.

Value

A tableList object

See Also

dim.tableList, dimnames.tableList rbind.tableList

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(chickwts)

# Bundle chickwts data.frame together with a linear model
TL <- tableList(chickwts, lm(weight~feed, chickwts))

# tableList behaves like a data.table  
mean(TL[feed=="casein", weight])

# Aid part of the tableList object carries the linear model
aid(TL)

# dataType support
TL <- tableList(chickwts, lm(weight~feed, chickwts), dataType=list(group1="weight", group2="feed"))

tableMatrix documentation built on May 1, 2019, 8:42 p.m.