« Return to Thread: create frequency table

create frequency table

by T.D.Rudolph :: Rate this Message:

Reply to Author | View in Thread

I haven't quite been able to grasp how to use "hist" to create frequency tables so I have decided it will be easier to make my own.

I have a list of numeric data, x, from 0 to 30:
x <- sample(0:30, 100)

I've created an object containing the bins I would like frequency counts by:
z <- as.matrix(seq(from=0, to=30, by=1))

I would now like to create a new column in z containing counts of all values in x less than or equal to [m,1], thereby allowing me to conduct further modifications.  My intuition tells me this is not that difficult but I lack the programming prowess.

Does anyone have a solution?

 « Return to Thread: create frequency table