[R] running AMOVA from spreadsheet genotype data
Patrick Kuss
Patrick.Kuss at unibas.ch
Tue Oct 25 17:28:33 CEST 2005
Hi,
I plan to run amova in R from randomly generated subsets of my original dataset.
The structure of my data looks as below:
region <- rep(c("east","west"),each=8)
pop <- c(rep(1:4,each=4))
ind <- c(rep(1:4,4))
l.1 <- c(1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0)
l.2 <- sample(c(0,1),16,replace=T)
l.3 <- sample(c(0,1),16,replace=T)
l.4 <- sample(c(0,1),16,replace=T)
l.5 <- sample(c(0,1),16,replace=T)
l.6 <- sample(c(0,1),16,replace=T)
data <- data.frame(region,pop,ind,l.1,l.2,l.3,l.4,l.5,l.6)
data
Is there an easy way to generate amova style $samples, $distances, $structures
data.frames from my data subset?
Cheers
Patrick
--
Patrick Kuss
PhD-student
Institute of Botany
University of Basel
Schönbeinstr. 6
CH-4056 Basel
+41 61 267 2976
More information about the R-help
mailing list