Re: [R] select subrows based on a specific column in a matrix

2012-06-07 Thread Seungyeul Yoo
Dear Rui, Thank you so much. Yes, that function is what I wanted. I will make sure I post a data example for the next time. Thank you for your help again. Bests, Seungyeul On Jun 7, 2012, at 12:50 PM, Rui Barradas wrote: > Hello, > > You should post a data example, like the posting guide sa

Re: [R] select subrows based on a specific column in a matrix

2012-06-07 Thread Rui Barradas
Hello, You should post a data example, like the posting guide says. If your dataset is large, use something like dput(head(dat, 20)) # paste the output of this in your post. where 'dat' is your dataset. Now, try # make up some data set.seed(12) dat <- matrix(c(sort(rnorm(10)), sample(let

[R] select subrows based on a specific column in a matrix

2012-06-07 Thread Seungyeul Yoo
Hi all, I have a matrix with 1 rows and 10 columns. The last columns contains another identifiers but the values are not uniques so that I want to generate another matrix with rows with unique values in the last column. If I did tmp<-unique(my_mat$col10) this will give me 8560 unique ent