[R] NA handling problem in capscale (vegan)
Nevil Amos
nevil.amos at gmail.com
Thu Nov 11 08:14:39 CET 2010
I am having a problem with NA handling in capscale function.
as I understand it from the help capscale should permit NA values when
na.action=na.mit or na.exclude,
however I am getting the error
Error in X[nas, , drop = FALSE] : incorrect number of dimensions
trivial example is pasted below.
library(vegan)
mydist<- matrix(1:25, 5, 5)
mydata<-matrix(rnorm(1:25),5,5)
mydata[3,1]<-NA
mydata<-data.frame(mydata)
capscale(mydist~X1+X2+Condition(X3),data=mydata,na.action = na.omit)
Thanks
Nevil Amos
More information about the R-help
mailing list