Re: [R] counting the number of elements in a column

2008-11-18 Thread Jorge Ivan Velez
Dear kayj, Here is one way: # Data set.seed(123) x=runif(100) # Cuts as.data.frame.table(table(cut(x,seq(0,1,by=0.1 #Var1 Freq #1(0,0.1]7 #2 (0.1,0.2] 12 #3 (0.2,0.3] 11 #4 (0.3,0.4]9 #5 (0.4,0.5] 14 #6 (0.5,0.6]7 #7 (0.6,0.7] 11 #8 (0.7,0.8] 11 #9 (0.8,0.9]

Re: [R] counting the number of elements in a column

2008-11-17 Thread David Winsemius
On Nov 18, 2008, at 12:50 AM, kayj wrote: Hi All, I have a column that contains values between 0 and 1. I would like to make a table that consists of the number of elements in each category. For example , how many elements have values between 0 and 0.1, 0.1 to 0.2, 0.2 to 0.3,etc……..0

[R] counting the number of elements in a column

2008-11-17 Thread kayj
Hi All, I have a column that contains values between 0 and 1. I would like to make a table that consists of the number of elements in each category. For example , how many elements have values between 0 and 0.1, 0.1 to 0.2, 0.2 to 0.3,etc……..0.9 to 1. Is there an easy way to do this? Thanks