Description Usage Arguments Details Value Examples
Interconvert an array, a raw data frame, and frequency distribution data.frame.
1 |
data |
a data frame or array |
out |
the output format, see examples |
Multivariate categorical data can be represented in several ways. Three comon ways are : a contingency table, a data frame of raw observations (1 row = 1 subject), and a long data frame with a variable containing the counts in the contingency table.
a matrix containing the Markov basis as its columns (for easy addition to tables)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data(Titanic)
# array to others
teshape(Titanic, "freq")
teshape(Titanic, "tab") # what it was
teshape(Titanic, "raw")
# freq to others
TitanicFreq <- teshape(Titanic, "freq")
teshape(TitanicFreq, "freq") # what it was
teshape(TitanicFreq, "tab") # == Titanic
teshape(TitanicFreq, "raw")
# raw to others
TitanicRaw <- teshape(Titanic, "raw")
teshape(TitanicRaw, "freq")
teshape(TitanicRaw, "tab")
teshape(TitanicRaw, "raw")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.