title: R loop using a vector with 11 mini data sets
body: <p>I'm trying to create a loop to run a function, rpt, on 11 different data sets. Here is the code</p>
  <pre><code> for (i in data_names) {
      foo = rpt(odba ~ (1|date.1), grname = &quot;date.1&quot;, data= data_names[i], datatype = &quot;Gaussian&quot;, 
                          nboot = 500, npermut = 0)
      print(foo)
    }
  </code></pre>
  <p>The data_names is the vector with the datasets as shown. Each data set has a column for Turtle, date.1, and odba (the y-variable in this case).</p>
  <pre><code>data_names = c(R3L12rep, R3L1rep, R3L2rep, R3L4rep, R8L1rep, R3L9rep, R3L8rep, 
                  R3L11rep, R8NATL123rep, R8L4rep, R4L8rep) 
  </code></pre>
  <p>When I run the loop it tells me</p>
  <blockquote>
  <p>Error in stats::complete.cases(data[all.vars(formula)]) :
  invalid 'type' (unknown) of argument</p>
  </blockquote>
  <p>I'm not sure as to why it is doing this. I've tried putting quotations around the data sets in the vector but that didn't do anything.</p>