title: Error in eval(predvars, data, env) : object 'Sewer' not found
body: <p>I have a set of data containing species names and numbers (<code>spp_data</code>) and I am trying to test how the species are influenced by different parameters such as pH, conductivity, as well as the Sewer position (Upstream/Downstream) (<code>env_data1</code>).
  When I'm trying to run the <code>lm()</code> I get the following error:</p>
  
  <pre><code>lm1 &lt;- lm(specnumber ~ Sewer + pH + Conductivity, data=spp_data,env_data1)
  </code></pre>
  
  <blockquote>
    <p>Error in eval(predvars, data, env) : object 'Sewer' not found</p>
  </blockquote>
  
  <p>Is it because the column <code>Sewer</code> is non-numeric?
  I also tried to exclude that column and run the <code>lm()</code> but it did not work.</p>
  
  <h2>species data</h2>
  
  <pre><code>summary(spp_data)
      Pisidium        G_pulex         C_pseudo        A_aquatic          V_pisc       
   Min.   :0.000   Min.   : 0.00   Min.   : 0.000   Min.   :0.0000   Min.   :0.00000  
   1st Qu.:0.000   1st Qu.: 3.00   1st Qu.: 0.000   1st Qu.:0.0000   1st Qu.:0.00000  
   Median :0.000   Median : 8.00   Median : 3.000   Median :0.0000   Median :0.00000  
   Mean   :1.429   Mean   :16.86   Mean   : 4.476   Mean   :0.5714   Mean   :0.04762  
   3rd Qu.:2.000   3rd Qu.:20.00   3rd Qu.:10.000   3rd Qu.:0.0000   3rd Qu.:0.00000  
   Max.   :7.000   Max.   :68.00   Max.   :16.000   Max.   :4.0000   Max.   :1.00000  
  
      Taeniopt          Rhyacoph         Hydropsy        Lepidost        Glossos     
   Min.   :0.00000   Min.   :0.0000   Min.   :0.000   Min.   :0.000   Min.   : 0.00  
   1st Qu.:0.00000   1st Qu.:0.0000   1st Qu.:0.000   1st Qu.:0.000   1st Qu.: 0.00  
   Median :0.00000   Median :0.0000   Median :0.000   Median :0.000   Median : 0.00  
   Mean   :0.09524   Mean   :0.2381   Mean   :1.286   Mean   :1.238   Mean   : 1.81  
   3rd Qu.:0.00000   3rd Qu.:0.0000   3rd Qu.:3.000   3rd Qu.:2.000   3rd Qu.: 1.00  
   Max.   :2.00000   Max.   :2.0000   Max.   :5.000   Max.   :7.000   Max.   :14.00  
      Agapetus         Hydroptil          Limneph         S_person           Tipula 
   Min.   : 0.0000   Min.   :0.00000   Min.   :0.000   Min.   :0.00000   Min.   :0  
   1st Qu.: 0.0000   1st Qu.:0.00000   1st Qu.:0.000   1st Qu.:0.00000   1st Qu.:0  
   Median : 0.0000   Median :0.00000   Median :0.000   Median :0.00000   Median :0  
   Mean   : 0.5714   Mean   :0.04762   Mean   :0.381   Mean   :0.09524   Mean   :0  
   3rd Qu.: 0.0000   3rd Qu.:0.00000   3rd Qu.:1.000   3rd Qu.:0.00000   3rd Qu.:0  
   Max.   :12.0000   Max.   :1.00000   Max.   :2.000   Max.   :2.00000   Max.   :0  
      Culicida         Ceratopo     Simuliid          Chrinomi         Chrnomus     
   Min.   :0.0000   Min.   : 0   Min.   : 0.0000   Min.   : 0.000   Min.   : 0.000  
   1st Qu.:0.0000   1st Qu.: 0   1st Qu.: 0.0000   1st Qu.: 0.000   1st Qu.: 1.000  
   Median :0.0000   Median : 1   Median : 0.0000   Median : 2.000   Median : 3.000  
   Mean   :0.5714   Mean   : 7   Mean   : 0.5238   Mean   : 7.286   Mean   : 6.095  
   3rd Qu.:0.0000   3rd Qu.: 8   3rd Qu.: 0.0000   3rd Qu.: 8.000   3rd Qu.: 6.000  
   Max.   :5.0000   Max.   :31   Max.   :10.0000   Max.   :67.000   Max.   :41.000  
  </code></pre>
  
  <h2>environmental data</h2>
  
  <pre><code>summary(env_data)
      Sample             Sewer                 pH        Conductivity      
   Length:21          Length:21          Min.   :7.780   Length:21         
   Class :character   Class :character   1st Qu.:7.850   Class :character  
   Mode  :character   Mode  :character   Median :8.100   Mode  :character  
                                         Mean   :8.044                     
                                         3rd Qu.:8.270                     
                                         Max.   :8.280                     
       Depth           %rock            %mud      %sand,,         
   Min.   : 7.00   Min.   :10.00   Min.   : 0   Length:21         
   1st Qu.: 8.00   1st Qu.:10.00   1st Qu.:20   Class :character  
   Median :11.00   Median :70.00   Median :30   Mode  :character  
   Mean   :17.14   Mean   :57.14   Mean   :40                     
   3rd Qu.:28.00   3rd Qu.:80.00   3rd Qu.:90                     
   Max.   :40.00   Max.   :90.00   Max.   :90
  </code></pre>