Dear R-helpers, Apologies in advance for this (probably) simple question. I've searched the R Archive and can't seem to find a solution to my problem.
I have a data frame of vegetation quadrat data with the following format: Q S C 1 A 5 1 B 10 1 C 50 1 D 10 2 A 20 2 E 10 2 C 40 3 D 5 3 F 1 3 G 5 3 B 75 Where Q is the sample (vegetation quadrats), S is the species and C is the percentage cover of each species within the sample. I wish to transform this into a community data matrix for analysis within the vegan package, which needs the following data frame format: Q A B C D E F G 1 5 10 50 10 0 0 0 2 20 0 40 0 10 0 0 3 0 75 0 5 0 1 75 I can't manage to do this transformation so your help would be much appreciated. Thanks very much in advance. All the best, Des ______________________________________________ [email protected] 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.
