tsum3 | R Documentation |
Summarize a continuous dependent(y) variable with three independent(x) variables.
tsum3(d, y, l, u, e=c("Mean", "SD", "N"), h=NULL, ol1="", ol2="", ou="",
rm.dup=TRUE, repl=list(c("length"), c("n")))
d |
a data.frame or matrix with colnames |
y |
y variable name. a continuous variable |
l |
a vector of two x variable names to be shown on the left side. The length should be 2. |
u |
x variable name to be shown on the upper side |
e |
a vector of summarize function names |
h |
a list of two vectors of summarize function names for the first and second horizontal subgroups. If |
ol1 |
order of levels of 1st left side x variable |
ol2 |
order of levels of 2nd left side x variable |
ou |
order of levels of upper side x variable |
rm.dup |
if |
repl |
list of strings to replace after summarize. The length of list should be 2, and both should have the same length. |
A convenient summarization function for a continuous variable with three x variables; two on the left side, the other on the upper side.
A data.frame of summarized values. Column names are from the levels of u
. Row names are basically from the levels of l
.
Kyun-Seop Bae k@acr.kr
tsum
, tsum0
, tsum1
, tsum2
tsum3(CO2, "uptake", c("Type", "Treatment"), "conc")
tsum3(CO2, "uptake", c("Type", "Treatment"), "conc",
e=c("mean", "median", "sd", "min", "max", "length"),
h=list(c("mean", "sd", "length"), c("mean", "length")),
ol2=c("chilled", "nonchilled"),
repl=list(c("median", "length"), c("med", "n")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.