Hi Liliana,
Try
> table(factor(x, levels = 0:10))
0 1 2 3 4 5 6 7 8 9 10
0 2 0 6 0 2 2 1 0 1 6
Also, see ?factor.
HTH,
Jorge
On Tue, Nov 23, 2010 at 10:29 PM, Liliana Pacheco <> wrote:
> Hi R users
> I want to make a table of frequencies to show how many times the numbe
Hi R users
I want to make a table of frequencies to show how many times the numbers
form 0 to 10 appear in a vector.
For example, if the vector is:
> x
[1] 5 10 3 5 10 10 3 6 10 1 10 3 7 1 10 3 6 9 3 3
In this case I want a table that will show that the zero has frequency 0,
the o
2 matches
Mail list logo