Dear Colin,
Try this:
# Data
DF <- structure(c(0, 0, 0, 4, 27, 0, 1, 0, 7, 16, 1, 0, 0, 16, 44,
0, 0, 0, 2, 39), .Dim = c(5L, 4L), .Dimnames = list(c("L01.1",
"L01.2", "L01.3", "L01.4", "L01.5"), c("P01", "P02", "P03", "P04"
)))
# Distances
Names<-t(combn(colnames(DF),2))
apply(Names,1,function(x
Hello,
I have written a small function ('JostD' based upon a recent molecular
ecology paper) to calculate genetic distance between populations (columns in
my data set). As I have it now I have to tell it which 2 columns to use (X,
Y). I would like it to automatically calculate 'JostD' for all co
2 matches
Mail list logo