Running an analysis in RStudio, R version 3.0.1, Ubuntu 12.04. I am correlating environmental factors (envW) to an analysis (MDSnsj) using the function envfit from the vegan package 2.0-8. My environmental dataset (envW) has many missing values. I get the following error message when I run this simple command. I have tried putting text 'NA' in the missing spots but I get the same error message.
envfit(MDSnsj, envW, perm=999, na.rm=TRUE)->MDSnsef
>Error in if (any(x < 0, na.rm = na.rm)) { :
missing value where TRUE/FALSE needed
Can anyone explain to me what the error message means? AND .... Does anyone have any ideas how I can fix this? Thank you in advance
a guess at what is requested
traceback()
MDSnsef<-envfit(MDSnsj, envW, perm=999, na.rm=TRUE)
debugging in: envfit(MDSnsj, envW, perm = 999, na.rm = TRUE)
debug: {
UseMethod("envfit")
}