Dear R-help members
 
I would be grateful if anyone could help me with the following problem: I would 
like to combine two matrices (SCH_15 and SCH_16, they are attached) which have 
a  species presence/absence x sampling plot structure. The aim would be to have 
in the end only one matrix which shows all existing species and their 
presence/absence on all the different plots(an_1, an_2 etc.)
To do this I used the "merge" function in R.
Command:
output<-merge(SCH_15,SCH_16,by="species", all=TRUE)

The problem is that if the same species occurs in both "SCH" files (i.e. 
species Abutilon longicuspe occurs in both files) it is listed two times in the 
merged matrix. However, the aim would be that each species is listed only once 
in the final matrix.
How do I have to modify the R code? I guess I have to replace "all=TRUE" with 
something else but I can't figure out what it is.

Thank you for your help
Michael
 

______________________________________________
R-help@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.

Reply via email to