title: R: hourly to daily precipitation, Package plyr, ER:"no numeric values"
body: <p>I have hourly values for precipitation that I'd like to sum up over the hour. </p>
  
  <p>My data (Nd_hourly) looks like this:</p>
  
  <pre><code>    Datum   Uhrzeit Nd
  1   2013-05-01  01:00:00    0.0
  2   2013-05-01  02:00:00    0.1
  3   2013-05-01  03:00:00    0.0
  4   2013-05-01  04:00:00    0.3
  </code></pre>
  
  <p>(date,time, precipitation)</p>
  
  <p>and I'd like to have an output of Datum - Nd </p>
  
  <p>I did the min and max temperatur with the package plyr and the function ddply with</p>
  
  <pre><code>t_maxmin=ddply(t_air,.(Datum),summarize,Datum=Datum[which.max(T_Luft)],max.value=max(T_Luft),min.value=min(T_Luft))
  </code></pre>
  
  <p>I then tried to do something similar for the precipitation and tried </p>
  
  <pre><code>Nd_daily=ddply(Nd_hourly,.(Datum),summarize,Datum=Datum, sum(Nd_hourly))
  </code></pre>
  
  <p>but get the error message</p>
  
  <blockquote>
    <p>Error: only defined on a data frame with all numeric variables</p>
  </blockquote>
  
  <p>I assume something may be wrong with my data input? I imported data from Excel 2010 via a .txt file.</p>
  
  <p>Still very new to R and programming in general, so I would really appreciate some help :)</p>