[R-sig-eco] get common sampling sites from two data sets

2011-03-17 Thread Andres Mellado Diaz
Dear list members, I have two data sets (sites by species) with some sites in common, one with invertebrate data (X) and one with diatoms data (Y). I would like to get both new Xc and Yc matrices showing only those sites common to X and Y, to make similarity matrices and perform a mantel

Re: [R-sig-eco] get common sampling sites from two data sets

2011-03-17 Thread Etienne Laliberté
Here's one way. # create matrices x and y with some sites in common x - matrix(1, 4, 2) ; rownames(x) - letters[1:4] y - matrix(1, 4, 2) ; rownames(y) - letters[3:6] # identify which sites are in common for x and y xcommon - rownames(x) %in% rownames(y) ycommon - rownames(y) %in% rownames(x) #

Re: [R-sig-eco] get common sampling sites from two data sets

2011-03-17 Thread Christian Parker
Etienne Laliberté wrote: Here's one way. # create matrices x and y with some sites in common x - matrix(1, 4, 2) ; rownames(x) - letters[1:4] y - matrix(1, 4, 2) ; rownames(y) - letters[3:6] # identify which sites are in common for x and y xcommon - rownames(x) %in% rownames(y) ycommon -

[R-sig-eco] Help with mixed effects model using lme

2011-03-17 Thread Gabe Strain
Hi all, I am relatively new to R and am having problems modelling my data. I sampled a single salamander species along streams (Sites, random effect, n=16) over five months (fixed effect) with three methods (TRMT, fixed effect). Snout-to-vent length (SVL) was measured and salamanders (each

Re: [R-sig-eco] Help with mixed effects model using lme

2011-03-17 Thread Ben Bolker
On 03/17/2011 06:27 PM, Gabe Strain wrote: Hi all, I am relatively new to R and am having problems modelling my data. I sampled a single salamander species along streams (Sites, random effect, n=16) over five months (fixed effect) with three methods (TRMT, fixed effect). Philosophically,