R:UseMethod(select _)->中没有适用于“ factor”类对象的“ select_”适用方法

时间:2018-11-14 13:11:55

标签: r input compiler-errors statistics

我启动此命令

 select(FASCIA_ETA,stato)%>% 
    group_by(FASCIA_ETA) %>% 
    count(stato) %>% 
    mutate(statoRate=100*round(n/sum(n),2))

但是错误是:no applicable method for 'select_' applied to an object of class "factor"

输入为:

FASCIA_ETA  :Factor w/ 9 levels "da 0 a 24 anni",..: 5 5 7 3 4 3 5 4 4 5 ...
and stato  : int  1 1 1 1 1 1 1 1 1 1 ...

该错误的解决方案是什么? 谢谢。

0 个答案:

没有答案