Re: [R] Unique Values of a Matrix

2010-02-26 Thread Todd DeWees
I found that using Sort(unique(c(X)) also works to remove NA if you don't mind the unique values being sorted.... Todd DeWees, PhD Statistician University of Dundee Mackenzie Building Kirsty Semple Way Dundee DD2 4BF Scotland UK PH: 01382-420119 -Original Message- From:

Re: [R] Unique Values of a Matrix

2010-02-26 Thread Todd DeWees
Thank you. That worked. I had tried it before and failed, but after checking with you I realized that the problem was that my data was in a frame instead of a matrix. Thanks again, Todd Todd DeWees, PhD Statistician University of Dundee Mackenzie Building Kirsty Semple Way Dundee DD2 4BF

[R] Unique Values of a Matrix

2010-02-26 Thread Todd DeWees
I have a 280,000 x 11 matrix with various values and many NA values. What I would like to do is get a vector of every unique value in the matrix. For example: X = [ 12NA 43 1 7 NA 2 ] Returns: Unique_X = [ 1, 2, 3, 4, 7] Thanks, Todd [[alte