title: object not find when aggregating in R
body: <p>I am trying to use aggregate in R. I found an example code:  </p>
  
  <pre><code>attach(mtcars)   
  agg=aggregate(mtcars, by=list(cyl,vs),FUN=mean, na.rm=TRUE)      
  detach(mtcars)
  </code></pre>
  
  <p>This works fine. However when I try to do it using my data:</p>
  
  <pre><code>library(stats)  
  FileName="Raw.csv"  
  Raw=read.csv(FileName,header = TRUE)    
  Acc1=aggregate(Raw,by=list(Experiment,SsNum),FUN=mean, na.rm=TRUE)
  </code></pre>
  
  <p>I get the following error message:<br>
  Error in aggregate.data.frame(Raw, by = list(Experiment, SsNum), FUN = mean,      object 'Experiment' not found</p>
  
  <p>I also tries to run:<br>
  <code>Acc2=aggregate(Raw,by=list(Raw$Experiment,Raw$SsNum),FUN=mean, na.rm=TRUE)</code></p>
  
  <p>and I got the following error:<br>
  There were 50 or more warnings (use warnings() to see the first 50)</p>
  
  <p>The warnings are:
  1: In mean.default(X[[i]], ...) :
    argument is not numeric or logical: returning NA</p>
  
  <p>my main question is how the Acc1 is differrent from the online example (that works fine).</p>
  
  <p>thank you very much</p>
  
  <p>Ariel  </p>