title: RDA data argument is of the wrong type
body: <p>I am performing a redundancy analysis in RStudio. My data includes several environmental variables as the community data matrix, and a GROUP column, which is the constraining matrix. For example:</p>
  
  <pre><code>CONDUCTIVITY    pH    GROUP
  453            7.5    A
  462            7.7    A
  500            8.1    B
  525            8.0    B
  308            8.4    C
  306            8.5    C
  </code></pre>
  
  <p>I am doing a redundancy analysis to compare the environmental variables between groups (which represent locations), such as, is the conductivity in group A significantly different than the conductivity in group B. My R script is as follows:</p>
  
  <pre><code>df &lt;- read.csv("All_data_long_format.csv")
  
  library(vegan)
  
  rda &lt;- rda(df[,2:9] ~ df$GROUP) # columns 2 to 9 are the environmental variables
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>Error in terms.formula(formula,"Condition",data=data): 'data' argument is of the wrong type.
  </code></pre>
  
  <p>I'm not sure what this means, but my guess is 'df' is the wrong type, but I'm not sure why or how to solve it. </p>