printTable2(sfsmisc)
printTable2()所属R语言包:sfsmisc
Add and Print Marginals for 2-way Contingency Tables
添加和打印边缘人“的2路联表
译者:生物统计家园网 机器人LoveR
描述----------Description----------
printTable2() prints a 2-way contingency table “with all bells and whistles” (currently using German labeling).
printTable2()打印2列联表“,所有的钟声和口哨声”(目前使用德国标记)。
margin2table() computes marginals, adds them to the table and returns a margin2table object the print method for which adds text decorations (using "-" and "|").
margin2table()计算边缘人,并将其添加到表中,并返回一个margin2table对象的print方法,将文本修饰(使用"-"和"|")。
用法----------Usage----------
printTable2(table2, digits = 3)
margin2table(x, totName = "sum", name.if.empty=FALSE)
## S3 method for class 'margin2table'
print(x, digits = 3, quote = FALSE, right = TRUE, ...)
参数----------Arguments----------
参数:table2
a matrix with non-negative integer entries, i.e. the contingency table. </table>
一个矩阵,其中的非负整数的条目,即应变表。 </ TABLE>
参数:x
a matrix; for print(), the result of margin2table.
一个矩阵;print(),margin2table的结果。
参数:digits
Anzahl Dezimalstellen, auf die die H盲ufigkeiten gerundet werden sollen.
Anzahl Dezimalstellen,奥夫模具模具Häufigkeitengerundet werden应然。
参数:quote, right
logicals passed to print.default(), but with different default values.
逻辑值传递给print.default(),但用不同的默认值。
参数:totName
string to use as row- and column- name if x has corresponding dimnames.
字符串使用的行和列的名字,如果x有相应的dimnames。
参数:name.if.empty
logical indicating if the margin “totals” should be named in any case.
逻辑表明,如果在任何情况下,应命名为的缘“总计”。
参数:...
further potential arguments, unused currently.
另一个潜在的参数,目前未使用。
值----------Value----------
margin2table returns a matrix with added marginals, i.e., an extra row and column, and is of class "margin2table" (and "table" still) which has a nice print method.
margin2table返回一个边缘人,也就是说,一个额外的行和列的矩阵,是类"margin2table"("table"还是),它有一个很好的打印方法。
printTable2 is just producing output.
printTable2只是产生输出。
(作者)----------Author(s)----------
Martin Maechler, Feb.1993; then Dec 2003
参见----------See Also----------
table, ftable.
table,ftable。
实例----------Examples----------
margin2table(diag(4),,TRUE)
m <- diag(3); colnames(m) <- letters[1:3]
margin2table(m)
margin2table(m / sum(m))
data(HairEyeColor)
margin2table(HairEyeColor[,, "Male"])
printTable2(HairEyeColor[,, "Male"])
printTable2(HairEyeColor[,, "Female"])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|