mlth.data.frame | R Documentation |
Create a multi-header data frame which is an hierarchical collection of variables.
mlth.data.frame(
...,
row.names = NULL,
check.rows = FALSE,
check.names = FALSE,
fix.empty.names = FALSE
)
mlth(
...,
row.names = NULL,
check.rows = FALSE,
check.names = FALSE,
fix.empty.names = FALSE
)
... |
the collection of named variables or sub-tables, each of class |
row.names |
|
stringsAsFactors |
same as for |
defaultName |
the single character value to fill empty names. |
fixNamesSep |
the separator which is used when there are more than one empty names. |
A mlth.data.frame
object is a list of variables and mlth.data.frame
s.
Each variable must be a vector of atomic data type (e.g., POSIX date will not work).
Each variable or sub-table must have a name, the names must be unique within
the table/sub-table, but not across sub-tables.
Unlike data.frame
, a multi-header data frame cannot have zero columns and non-zero rows
but can have zero rows and non-zero columns or zero columns and rows.
mlth.data.frame
object
A<-mlth.data.frame(X=c('A','B','C'),
Y=list(
N=1:3,
M=4:6))
## The empty names are filled-in
B<-mlth.data.frame(X=list(rnorm(10),rnorm(10)),
Y=list(rnorm(10),rnorm(10)),
row.names=letters[1:10])
## str method for mlth.data.frame
str(B)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.