【发布时间】:2020-05-08 02:57:20
【问题描述】:
我是 R 新手,我按照说明幻灯片进行绘图:
survey[["Program"]] 是数据框中的分类数据列。
> survey[["Program"]] # returns the Program column as a vector
[1] "PPM" "PPM" "PPM" "Other" "PPM" "PPM" "PPM" "Other" "PPM" "Other" "MISM" "PPM" "MISM"
[14] "Other" "PPM" "PPM" "PPM" "PPM" "PPM" "Other" "PPM" "MISM" "PPM" "PPM" "PPM" "MISM"
[27] "PPM" "Other" "Other" "PPM" "Other"
但是,当我实现 plot(survey[["Program"]]) 时,我得到了错误:
Error in plot.window(...) : need finite 'ylim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf
我不知道为什么我不能得到如图所示的结果。
【问题讨论】: