0

我有一个连续观察的向量,如下所示:

x = c(0,0.001,0.03,0.8,0.005,0.6,0.12,0.3,0.75,0.9,0.043,0.81,0.5,0.21,0.27,0.17,1,0.9)

我把它分成二十个箱子,如下所示:

cut(x, breaks=seq(0,1,by=0.05),include.lowest = TRUE)

如何检索每个 bin 中“下降”的元素数量?例如,我如何知道 bin [0,0.05] 中有 5 个项目?

非常感谢!!

4

0 回答 0