Re: [R] unique column values and counts

2010-11-29 Thread Ben Tupper
Hi, On Nov 29, 2010, at 7:40 PM, wrote: How do I create a second dataframe that shows unique column values from first dataframe and the number count of rows in first dataframe where column value appears? For example, first dataframe is this: x <- matrix(c(101:104,101:104,105:106,1:10),

[R] unique column values and counts

2010-11-29 Thread topman77
How do I create a second dataframe that shows unique column values from first dataframe and the number count of rows in first dataframe where column value appears? For example, first dataframe is this: > x <- matrix(c(101:104,101:104,105:106,1:10), nrow=10, ncol=2) > x [,1] [,2] [1,] 1