[R] extracting all different items in a matrix colum or vector

Michael Dewey lists at dewey.myzen.co.uk
Wed Nov 16 11:09:32 CET 2016


You say you are coming back to R after a pause. I think the key word in 
Sarah's response is re-reading. Why not start with the material you used 
before and re-read it? If you have never read the Introduction to R 
which comes with your installation that is worth a read too.

On 15/11/2016 20:47, bgnumis bgnum wrote:
> 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]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Michael
http://www.dewey.myzen.co.uk/home.html



More information about the R-help mailing list