[R] Script to count unique values from two linked matricies

Benjamin Gillespie
Mon, 24 Sep 2012 12:47:54 -0000

Hi Petr,

Please see the attached .csv files - perhaps these will help,

Thanks,

Ben Gillespie
Research Postgraduate

School of Geography
University of Leeds
Leeds
LS2 9JT

Tel: +44(0)113 34 33345
Mob: +44(0)770 868 7641
http://www.geog.leeds.ac.uk/
________________________________________
From: PIKAL Petr [petr.pikal at precheza.cz]
Sent: 24 September 2012 13:34
To: Benjamin Gillespie; r-help at r-project.org
Subject: RE: [R] Script to count unique values from two linked matricies

Hi

I have no access to Nabble so it is difficult to understand what do you want.

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of benrgillespie
> Sent: Monday, September 24, 2012 1:47 PM
> To: r-help at r-project.org
> Subject: [R] Script to count unique values from two linked matricies
>
> I hope you can help with this one.
>
> I have two matricies:
>
> 1. A species abundance matrix:
>
> <http://r.789695.n4.nabble.com/file/n4643979/2species_matrix.jpg>
>
> 2. A species trait score matrix:
>
> <http://r.789695.n4.nabble.com/file/n4643979/2trait_matrix.jpg>
>
> The trait matrix lists trait scores for each species as listed in the
> species abundance matrix.
>
> I would like to create a script that would effectively count the unique
> traits (trait richness) for each site and produce an output like this:
>
> <http://r.789695.n4.nabble.com/file/n4643979/trait_richness.jpg>
>
> Firstly, is this possible in R? Secondly, if so, how would you go about

Why not, everything is possible with R. Maybe you could provide data by
dput(species).

Maybe you want something like ?table or ?aggregate.

Without data it is hard to say.

Regards
Petr



> writing a script to achieve my aim?
>
> Many thanks in advance, please let me know if you need further
> information.
>
> Ben Gillespie (Research Postgraduate)
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Script-to-
> count-unique-values-from-two-linked-matricies-tp4643979.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.