
Last chance! 50% off unlimited learning
Sale ends in
integer.frequency(x,bins)
x
.integer.frequency
counts the number of values in x
that are
equal to each of the values in bins
. If there are values in bins
that are not in x
, the count for that bin will be zero, and if values in
x
are not included in bins
, they will be ignored. It will not
handle NAs correctly. However, it is only meant to be called by freq
.freq
testvec<-c(sample(1:10,100,TRUE),rep(12,5))
# leave out the 10 bin and stick in an 11 bin which will be empty
integer.frequency(testvec,c(1:9,11,12))
Run the code above in your browser using DataLab