I'm trying to run RDA analysis using the R package 'vegan'
If I go with the below, using column headers, I get the error "object "width" not recognised". Suggesting that I haven't imported column headers properly.
rda(width+height~age+weight, data=mydata)
But
if I go with the below, it works, so obviously it recognises headers
rda(mydata$width+mydata$height~mydata$age+mydata$weight)
Similarly, other packages recognise headers for example the below works fine.
ggplot(mydata,aes(height, width))
Presumably it's an issue with the use of "data=mydata". I'm baffled and feel it's probably something super simple I'm overlooking, but I have tried and tried to no avail. It was going fine the other day.