[R-sig-eco] RDA with only dummy variable in environmental matrix

amelie_can amelie_qcan at hotmail.com
Tue Jun 22 16:15:46 CEST 2010


Hello Zoltan, 

thank you for your reply. When I tried what you suggested, the rda
calculation did not proceed and I received this error message: "Error in
colMeans(x, na.rm = TRUE) : 'x' must be numeric". 

This is the same example I used yesterday, but with the changes you
proposed: 
mat.sp = matrix(c(40, 20, 37, 49, 52, 34, 35, 87, 90, 45, 49, 52, 34, 35,
87,5,39,99,8,45),nrow = 4, ncol=5, dimnames = list(c("sites1", "sites2",
"sites3","sites4"),c("sp1", "sp2", "sp3", "sp4", "sp5")))
mat.env = matrix(c("NAT","NAT","NR","REST"),4,1, dimnames = list(c("sites1",
"sites2", "sites3","sites4"),c("TYPE")))
as.factor(mat.env[,1])
summary(mat.env)

rda = rda (mat.sp,mat.env)
summary(rda)
plot(rda, scaling=1, type="points")

Do you know what is the problem? 
-- 
View this message in context: http://r-sig-ecology.471788.n2.nabble.com/RDA-with-only-dummy-variable-in-environmental-matrix-tp5206190p5208969.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.



More information about the R-sig-ecology mailing list