Description Usage Arguments Value Examples
Produces a 2- or 1-dimensional table of means (and a measure of variation) regarding a variable and one or two factors.
1 |
value |
numeric vector, for which the table should be created. |
ver.factor |
factor constituting the rows of the table. |
hor.factor |
factor constituting the columns of the table. |
variation |
can be either "se" or "sd". variation="se" computes the standard errors and variation="sd" the standard deviation. |
A mean table.
1 2 3 4 5 6 7 8 | data(mydata)
mydata.sumscore <- rowSums(mydata[,c("item1", "item2", "item3", "item4")])
meanTable(mydata.sumscore, mydata$age_group7)
meanTable(mydata.sumscore, mydata$age_group7, mydata$sex)
meanTable(mydata.sumscore, mydata$sex, mydata$age_group7)
(tab <- meanTable(mydata.sumscore, mydata$age_group7, mydata$sex, variation="sd"))
#saveTable(tab, "meanTable.rtf")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.