警告信息在R:'>'中对因素没有意义

时间:2017-05-04 13:51:36

标签: r

我循环这个案例:naked_FINAL$V2 这是一个浮动:

-0.182231972057    -0.0394883040297   -0.175151743984    -1.0               0.00382017030833   -0.138775422474   -0.136759608005    -0.00931498957763  0.0467232056437    -0.177560317462    -0.0462697502318   -0.114731438657   
 -0.133543749187    -0.0796649609804   -1.0               -0.0871896849893   -0.0671498062617   -1.0     -0.091948159794    -0.0902651789613   -0.157156204337    -0.0847245799066   -0.0981150527055   -0.0673055244922 

我想只选择>浮点数0.05:

for (i in unique(naked_FINAL$V2)) {   
    high_prion_naked <- naked_FINAL$V2[which(naked_FINAL$V2 < 0.05)]
}

当我在R控制台中执行此操作时,我收到警告消息:

There were 50 or more warnings (use warnings() to see the first 50)

> warnings()
Warning messages:
1: In Ops.factor(naked_FINAL$V2, 0.05) : ‘>’ not meaningful for factors
2: In Ops.factor(naked_FINAL$V2, 0.05) : ‘>’ not meaningful for factors

我能做些什么呢?

0 个答案:

没有答案