| integer.frequency {plotrix} | R Documentation |
Calculates the frequencies of integers in a vector.
integer.frequency(x,bins)
x |
a vector of integers. |
bins |
The values to count in x. These values may be a subset or
superset of the actual values included in 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.
A vector of counts.
Jim Lemon
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))