Displaying 1 result from an estimated 1 matches for "nb_occur".
2006 Mar 06
4
Contingency table and zeros
Hello,
Let's assume I have a vector of integers :
> myvector <- c(1, 2, 3, 2, 1, 3, 5)
My purpose is to obtain the cumulative distribution of these numerical
data, i.e. something like :
value nb_occur.
<=1 2
<=2 4
<=3 6
<=4 6
<=5 7
For this, I create a table with ;
> mytable <- table(myvector)
1 2 3 5
2 2 2 1
However, table() returns an array of integers, mytable[4] returns the
occurence number of the "5" item, which makes this table hard to ind...