title: How do I interpret this error from aggregate function in R
body: <p>I need some help with the aggregate function.  Here is my data:  (it shows three columns however my understanding is that there is 2 columns, named V1 and V3 respectively.  The first column showing numbers starting at 330 are the row.names.)  </p>
  
  <p>I'd like to do a simple aggregate function like mean on V3 using V1 as the key.  I have a feeling my data type is not correct, but I don't know how to convert!</p>
  
  <pre><code>&gt; testing
                          V1                 V3
  330 chr1_10440000_11000000   1.59987556934357
  335 chr1_10440000_11000000    89.185531616211
  338 chr1_10440000_11000000   1.25018584728241
  340 chr1_10440000_11000000   5.91385841369629
  342 chr1_10440000_11000000   1.68633282184601
  345 chr1_11000000_11240000  0.118176721036434
  349 chr1_11000000_11240000     9.131010055542
  350 chr1_11000000_11240000 0.0575727485120296
  352 chr1_11000000_11240000   11.7410087585449
  353 chr1_11000000_11240000   10.5057544708252
  356 chr1_11000000_11240000   2.35379362106323
  360 chr1_11240000_12040000   0.08041662722826
  363 chr1_11240000_12040000   1.62903010845184
  366 chr1_11240000_12040000  0.039043802767992
  368 chr1_11240000_12040000   1.90981948375702
  369 chr1_11240000_12040000   7.19360542297363
  370 chr1_11240000_12040000   5.95961284637451
  371 chr1_11240000_12040000   4.40743684768677
  372 chr1_11240000_12040000  0.600234627723694
  373 chr1_11240000_12040000   20.9832191467285
  &gt; 
  </code></pre>
  
  <p>Here is the code I am trying to use and the corresponding error/warning message:</p>
  
  <pre><code>&gt; aggregate(testing, by=list(testing$V1), FUN=mean )
                   Group.1 V1 V3
  1 chr1_10440000_11000000 NA NA
  2 chr1_11000000_11240000 NA NA
  3 chr1_11240000_12040000 NA NA
  Warning messages:
  1: In mean.default(X[[1L]], ...) :
    argument is not numeric or logical: returning NA
  2: In mean.default(X[[2L]], ...) :
    argument is not numeric or logical: returning NA
  3: In mean.default(X[[3L]], ...) :
    argument is not numeric or logical: returning NA
  4: In mean.default(X[[1L]], ...) :
    argument is not numeric or logical: returning NA
  5: In mean.default(X[[2L]], ...) :
    argument is not numeric or logical: returning NA
  6: In mean.default(X[[3L]], ...) :
    argument is not numeric or logical: returning NA
  &gt; 
  </code></pre>