您的位置:首页 > 其它

2015年9月21日

2016-07-22 16:29 239 查看
#table 函数,ABG$P78-79
> Deer <- read.table(file = "Deer.txt",header = T)> View(Deer)> names(Deer)
[1] "Farm"    "Month"   "Year"    "Sex"     "clas1_4" "LCT"     "KFI"    [8] "Ecervi"  "Tb"     
> str(Deer)'data.frame': 1182 obs. of  9 variables: $ Farm   : Factor w/ 27 levels "AL","AU","BA",..: 1 1 1 1 1 1 1 1 1 1 ... $ Month  : int  10 10 10 10 10 10 10 10 10 10 ... $ Year   : int  0 0 0 0 0 0 0 0 0 0 ... $ Sex    : int  1 1 1 1 1 1 1 1 1 1 ... $ clas1_4: int  4 4 3 4 4 4 4 4 4 4 ... $ LCT    : num  191 180 192 196 204 190 196 200 197 208 ... $ KFI    : num  20.4 16.4 15.9 17.3 NA ... $ Ecervi : num  0 0 2.38 0 0 0 1.21 0 0.8 0 ... $ Tb     : int  0 0 0 0 NA 0 NA 1 0 0 ...> table(Deer$Farm)
   AL    AU    BA    BE    CB   CRC    HB   LCV    LN   MAN    MB    MO    NC    15    37    98    19    93    16    35     2    34    76    41   278    32    NV    PA    PN    QM R\xd1    RF    RO   SAL   SAU    SE    TI    TN  VISO    35    11    45    75    25    34    44     1     3    26    21    31    15    VY    40 
> table(Deer$Sex,Deer$Year)         0   1   2   3   4   5  99  1 115  85 154  75  78  34  21  2  76  40 197 123  60  35   0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: