I'm trying to use adonis (per the persistent advice of an advisor) to see what variation in the data set is due to bee colony (variable OBJECTID) and what is due other variables.
My dataframe is titled bees. Previous, I tried putting the LM into adonis directly with the data frame, but got the " 'x' must be an array of at least two dimensions" error code.
Then, I made the dataframe a matrix using the following code:
mat_bee <- as.matrix(bees)
adonis(Cubital.Index ~ bio_6 + Elevation + Latitude, data = mat_bee)
And I get the following error code:
Error in eval(lhs, data, parent.frame()) :
invalid 'envir' argument of type 'character'
It seems this error code is more broad, and about using a matrix rather than a function-specific error, because when I google the error, the results show this error pops up for many functions. I tried using dist() instead of as.matrix(), but the resulting object eliminated most of the data.
I'm a little confused as to what the next step would be for troubleshooting, and also don't know if I need to include OBJECTID as a predictor if I want to know how much of the variance in the model is explained by belonging to a specific bee colony (basically within vs between group variance within the model).