我有一个d
这样命名的列表:
V1
是 0 - 50 的整数集
V2
是 1500 - 1800 的实
V3
数集 是 1 - 50 的整数集
该列表总共包含 5100 个对象
现在我想绘制 的直方图V2
,其中V1
= 某个数字(0、1 或 10 等)
我尝试了不同的方法:
factor(d$V1)
qplot(V2, data=d, V1 = 1) --> not successful
d.subset <- subset(d, d$V1 = 1) --> not successful
我真的为此发疯了。检查特性d$V1
却没有发现什么奇怪的。任何人都可以帮助我吗?
is.factor(d$V1)
[1] TRUE
str(d$V1) Factor w/ 51 levels "1","2","3","4",..: 1 2 3 4 5 6 7 8 9 10 ...
levels(d$V1)
[1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19"
[20] "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30" "31" "32" "33" "34" "35" "36" "37""38"
[39] "39" "40" "41" "42" "43" "44" "45" "46" "47" "48" "49" "50" "51"