bgnumis bgnum
2016-Nov-15 12:33 UTC
[R] extracting all different items in a matrix colum or vector
Hi all,>From many time ago, I have return to R, I have a matrix with this values.C(jose, pepe, jose, luis, pepe, raul) I want to "read" this matrix or element and extract all different values, so the output matrix (that I want to download is: c(jose, pepe, luis, raul). There is a function to do this? Many thanks in advance. [[alternative HTML version deleted]]
Sarah Goslee
2016-Nov-15 17:56 UTC
[R] extracting all different items in a matrix colum or vector
Your question strongly suggests that you need to reread at least one introductory guide to R. But the answer to your specific question is the unique() function. Sarah On Tue, Nov 15, 2016 at 7:33 AM, bgnumis bgnum <bgnumis at gmail.com> wrote:> Hi all, > > > >From many time ago, I have return to R, I have a matrix with this values. > > C(jose, pepe, jose, luis, pepe, raul) > > I want to "read" this matrix or element and extract all different values, > so the output matrix (that I want to download is: > > c(jose, pepe, luis, raul). > > There is a function to do this? > > Many thanks in advance. >-- Sarah Goslee http://www.functionaldiversity.org
bgnumis bgnum
2016-Nov-15 20:47 UTC
[R] extracting all different items in a matrix colum or vector
Many Thanks Sarah Really I?m going to do it. If you can suggest me one complete and didactic I will be very gratefull. Anyway many thanks for your answer. 2016-11-15 18:56 GMT+01:00 Sarah Goslee <sarah.goslee at gmail.com>:> Your question strongly suggests that you need to reread at least one > introductory guide to R. > > But the answer to your specific question is the unique() function. > > Sarah > > On Tue, Nov 15, 2016 at 7:33 AM, bgnumis bgnum <bgnumis at gmail.com> wrote: > > Hi all, > > > > > > >From many time ago, I have return to R, I have a matrix with this > values. > > > > C(jose, pepe, jose, luis, pepe, raul) > > > > I want to "read" this matrix or element and extract all different values, > > so the output matrix (that I want to download is: > > > > c(jose, pepe, luis, raul). > > > > There is a function to do this? > > > > Many thanks in advance. > > > -- > Sarah Goslee > http://www.functionaldiversity.org >[[alternative HTML version deleted]]