table()函数 |
您所在的位置:网站首页 › r语言中frame含义 › table()函数 |
函数功能: table uses the cross-classifying factors to build a contingency table of the counts at each combination of factor levels.table函数构建列联表,统计每个因子的频数 函数语法: table(..., exclude = if (useNA == "no") c(NA, NaN), useNA = c("no", "ifany", "always"), dnn = list.names(...), deparse.level = 1)函数参数: 1. … ... one or more objects which can be interpreted as factors (including character strings), or a list (or data frame) whose components can be so interpreted.一个或者多个可以解释为因子或者字符串的对象;或者可以被解释成分的列表 2. exclude exclude levels to remove for all factors in .... If it does not contain NA and useNA is not specified, it implies useNA = "ifany".不做统计的因子水平,若要统计其中的NA值,需要设置exclude参数为NULL
当useNA 取值为’no’,不统计NA频数,当取值为’ifany’,'always’统计NA频数
|
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |