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

Sarah Goslee sarah.goslee at gmail.com
Tue Nov 15 18:56:18 CET 2016


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



More information about the R-help mailing list