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

2012-09-25 Thread arun
Heramb Gadgil ; R help 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 School of Geography University of Leeds Leeds LS2 9JT Tel: +44(0)113 34 33345

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

2012-09-25 Thread Benjamin Gillespie
ember 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<-dat

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

2012-09-25 Thread arun
3 A.K. - Original Message - From: Benjamin Gillespie To: Heramb Gadgil Cc: arun ; "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

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

2012-09-25 Thread Rui Barradas
g.leeds.ac.uk/ 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(

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

2012-09-25 Thread Benjamin Gillespie
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

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

2012-09-25 Thread Benjamin Gillespie
ed any further information, 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: arun [smartpink...@yahoo.com<mailto:smartpink...@ya

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

2012-09-25 Thread Rui Barradas
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 richness. Could you elaborate? A.K. - Original Me

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

2012-09-25 Thread Heramb Gadgil
chness is 7 (3+2+2) > traits. > > I hope this helps to explain, please let me know if you need any further > information, > > Ben Gillespie > Research Postgraduate > > School of Geography > University of Leeds > Leeds > LS2 9JT > > Tel: +44(0)113 34 33345 >

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

2012-09-25 Thread PIKAL Petr
t in simple for cycle. Regards Petr > -Original 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 c

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

2012-09-25 Thread Benjamin Gillespie
ber 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 richness. Could you elaborate? A.K. - Original Message - From: benrgillespie To: r-help@r-project.org Cc

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

2012-09-24 Thread benrgillespie
Richness should look like this: -- 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 Nabble.co

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

2012-09-24 Thread PIKAL Petr
t.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.

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

2012-09-24 Thread benrgillespie
I hope you can help with this one. I have two matricies: 1. A species abundance matrix: 2. A species trait score matrix: The trait matrix lists trait scores for

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

2012-09-24 Thread Benjamin Gillespie
: 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 Mess

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

2012-09-24 Thread benrgillespie
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 the