仙人掌掌 发表于 2020-8-26 23:22
得到解决啦!非常感谢!
str(datexpr2)
'data.frame': 1600 obs. of 63 variables:
$ DBS_2 : num 43 0 16 31 0 0 0 0 0 0 ...
$ DBS_3 : num 0 0 0 21 0 0 0 0 0 0 ...
$ DBS_4 : num 17 0 0 54 0 0 0 0 0 0 ...
$ DBS_5 : num 0 0 0 31 0 0 0 0 0 0 ...
$ DBS_7 : num 70 0 22 0 0 0 0 0 0 0 ...
$ DBS_9 : num 0 0 28 13 0 0 0 0 0 0 ...
$ DBS_11: num 0 0 0 21 0 0 0 0 0 0 ...
$ DBS_12: num 0 0 0 26 0 0 0 0 0 0 ...
$ DBS_13: num 0 0 0 17 0 0 0 0 0 0 ...
$ DBS_15: num 0 0 0 66 0 0 0 0 0 0 ...
$ DBS_17: num 74 0 0 48 0 30 0 0 0 0 ...
$ DBS_20: num 61 0 0 45 0 0 0 0 14 0 ...
$ DBS_21: num 86 0 44 36 0 0 0 0 0 0 ...
$ DBS_22: num 0 0 0 16 0 0 0 0 0 0 ...
$ DBS_24: num 14 0 0 35 0 0 0 0 0 0 ...
$ DBP_2 : num 792 0 338 0 0 472 276 0 0 0 ...
$ DBP_3 : num 585 0 683 0 0 118 0 5 0 0 ...
$ DBP_4 : num 341 0 69 42 0 73 0 0 0 0 ...
$ DBP_5 : num 2087 0 1172 0 0 ...
$ DBP_7 : num 717 0 0 46 0 0 431 0 8 0 ...
$ DBP_9 : num 1100 0 0 37 0 0 779 0 11 0 ...
$ DBP_11: num 1315 0 1403 0 0 ...
$ DBP_12: num 0 0 0 0 0 8 0 0 0 0 ...
$ DBP_13: num 6 0 0 0 0 0 0 0 0 437 ...
$ DBP_15: num 308 0 755 41 0 65 342 0 0 0 ...
$ DBP_17: num 594 0 303 0 0 258 52 0 0 0 ...
$ DBP_20: num 676 0 111 147 0 333 147 10 0 0 ...
$ DBP_21: num 280 0 273 17 0 0 0 0 0 0 ...
$ DBP_22: num 209 0 87 24 0 146 0 0 0 4 ...
$ DBP_24: num 382 0 371 0 0 501 219 0 0 0 ...
$ NXS_1 : num 0 0 0 91 0 0 0 0 39 0 ...
$ NXS_4 : num 0 0 0 222 0 0 0 0 45 0 ...
$ NXS_7 : num 0 0 0 170 0 0 0 0 107 0 ...
$ NXS_8 : num 0 0 0 129 0 0 0 0 47 0 ...
$ NXS_9 : num 0 0 0 45 0 0 0 0 43 0 ...
$ NXS_14: num 0 0 0 67 0 0 0 0 19 0 ...
$ NXS_15: num 0 0 0 233 0 0 0 0 95 0 ...
$ NXS_16: num 0 0 0 156 0 0 0 0 105 0 ...
$ NXS_17: num 0 0 0 95 0 0 0 0 55 0 ...
$ NXS_19: num 0 0 0 342 0 0 0 0 127 0 ...
$ NXS_21: num 0 0 0 119 0 0 0 0 11 0 ...
$ NXS_22: num 0 0 0 33 0 0 0 29 0 0 ...
$ NXS_23: num 0 0 0 88 0 0 0 0 60 0 ...
$ NXS_24: num 0 0 0 154 0 0 0 0 66 0 ...
$ NXS_26: num 0 0 0 112 0 0 0 0 65 0 ...
$ NXS_27: num 0 0 0 128 0 0 0 0 0 0 ...
$ NXP_1 : num 0 16 0 0 0 0 0 117 18 0 ...
$ NXP_2 : num 0 2039 0 10 0 ...
$ NXP_3 : num 0 11 0 102 21 0 0 0 23 0 ...
$ NXP_5 : num 0 145 0 0 40 0 0 215 0 0 ...
$ NXP_7 : num 0 0 0 22 654 0 0 0 0 0 ...
$ NXP_9 : num 0 334 0 0 0 0 0 0 0 36 ...
$ NXP_12: num 0 32 0 0 0 0 0 0 0 446 ...
$ NXP_13: num 0 0 0 119 0 0 0 206 84 0 ...
$ NXP_14: num 0 16 0 0 0 0 0 0 0 0 ...
$ NXP_15: num 0 0 0 0 0 0 0 342 0 0 ...
$ NXP_16: num 0 333 0 27 2128 ...
$ NXP_17: num 0 1970 0 302 0 0 0 420 115 0 ...
$ NXP_18: num 0 1147 0 0 0 ...
$ NXP_20: num 0 0 0 147 0 0 0 0 31 0 ...
$ NXP_21: num 0 118 0 287 8 0 0 14 73 0 ...
$ NXP_22: num 0 0 0 0 0 0 0 0 0 2 ...
$ phylum: chr "Enterobacteriaceae" "Lactobacillaceae" "Fusobacteriaceae" "Lactobacillaceae" ...
> rare3 = data.frame(aggregate(datexpr2, by=list(phylum), FUN=sum))
Error in FUN(X[
], ...) : 'type'(character)参数不对
######分割线
大佬们,像我这情况咋整呢??求助啊