to count unique values from two linked matricies
HI Ben,
Sorry,I couldn't understand how you counted the trait richness. Could you
elaborate?
A.K.
- Original Message -
From: benrgillespie gy...@leeds.ac.uk
To: r-help@r-project.org
Cc:
Sent: Monday, September 24, 2012 7:47 AM
Subject: [R
http://www.geog.leeds.ac.uk/
From: arun [smartpink...@yahoo.com]
Sent: 24 September 2012 19:36
To: Benjamin Gillespie
Subject: Re: [R] Script to count unique values from two linked matricies
HI Ben,
Sorry,I couldn't understand how you counted the trait
Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Benjamin Gillespie
Sent: Tuesday, September 25, 2012 10:11 AM
To: arun; r-help@r-project.org
Subject: Re: [R] Script to count unique values from two linked
matricies
Hi,
Thanks for helping
To: Benjamin Gillespie
Subject: Re: [R] Script to count unique values from two linked matricies
HI Ben,
Sorry,I couldn't understand how you counted the trait richness. Could you
elaborate?
A.K.
- Original Message -
From: benrgillespie gy...@leeds.ac.uk
To: r-help@r-project.org
Cc:
Sent
: +44(0)770 868 7641
http://www.geog.leeds.ac.uk/
From: arun [smartpink...@yahoo.commailto:smartpink...@yahoo.com]
Sent: 24 September 2012 19:36
To: Benjamin Gillespie
Subject: Re: [R] Script to count unique values from two linked matricies
HI Ben,
Sorry,I
14:22
To: Benjamin Gillespie
Cc: PIKAL Petr; Rui Barradas; Heramb Gadgil; R help
Subject: Re: [R] Script to count unique values from two linked matricies
Hi Ben,
Just a modification of Petr's solution with library(data.table):
dat1-data.frame(Species=paste0(Species,1:3),Site1=c(5,NA,4),Site2=c
/
From: Rui Barradas [ruipbarra...@sapo.pt]
Sent: 25 September 2012 10:30
To: Benjamin Gillespie
Cc: arun; r-help@r-project.org
Subject: Re: [R] Script to count unique values from two linked matricies
Hello,
Try the following.
countTrait - function(x) length( unique(x[x != 0
heramb.gad...@gmail.com
Cc: arun smartpink...@yahoo.com; r-help@r-project.org r-help@r-project.org
Sent: Tuesday, September 25, 2012 8:56 AM
Subject: RE: [R] Script to count unique values from two linked matricies
Fantastic help - thanks guys.
Heramb, Pikal and Rui all came up with solutions.
I prefer
2012 17:04
To: Benjamin Gillespie
Cc: R help
Subject: Re: [R] Script to count unique values from two linked matricies
Hi Ben,
No problem.
The code could be collapsed to 2 steps:
library(data.table)
library(reshape)
datm-merge(melt(dat1),melt(dat2),by=Species)
dat3-data.frame(unlist(lapply(lapply
...@precheza.cz; Rui Barradas ruipbarra...@sapo.pt;
Heramb Gadgil heramb.gad...@gmail.com; R help r-help@r-project.org
Sent: Tuesday, September 25, 2012 9:34 AM
Subject: RE: [R] Script to count unique values from two linked matricies
Excellent - thanks so much.
Ben Gillespie
Research Postgraduate
Note, trait richness would be 5 and not 4 at site 1 perfectly
demonstrating why I want to create a script rather than manually count!
--
View this message in context:
http://r.789695.n4.nabble.com/Script-to-count-unique-values-from-two-linked-matricies-tp4643979p4643980.html
Sent from
: PIKAL Petr [petr.pi...@precheza.cz]
Sent: 24 September 2012 13:34
To: Benjamin Gillespie; r-help@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
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
] 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
Richness should look like this:
http://r.789695.n4.nabble.com/file/n4644004/trait_richness.jpg
--
View this message in context:
http://r.789695.n4.nabble.com/Script-to-count-unique-values-from-two-linked-matricies-tp4643979p4644004.html
Sent from the R help mailing list archive at
15 matches
Mail list logo