I'm trying to do a Canonical Correspondence Analysis in R using the vegan package. I've run it no problem with my continuous variables, but when I include some categorical variables (which I'm able to do in XLSTAT program), R returns with an error. How do I include this in my code?
my categorical variables are:
- porifera_preference
- category
This is my code:
gastropod_matrix <- as.matrix(mollusca[,21:24])
gastropod_cca <- cca(gastropod_matrix~porifera_presence + category +
average + bpi_st_fi + northing + easting + depth, data=mollusca)
plot(gastropod_cca)
I know that R will likely be confused with this code but I don't know how to change it. Please help!