search for: obsfivemin

Displaying 1 result from an estimated 1 matches for "obsfivemin".

2010 Mar 10
3
Help with aggregate and cor
...ts between 'Mar 1, 2007' and 'Apr 1, 2007') group by id,tshour order by id,tshour; I've pulled data from PostgreSQL into R, and have a dataframe containing a timestamp column, v, and o (both numeric). I created an grouping index for every 5 minutes along these lines: obsfivemin <- trunc(obsts,units="hours") +( floor( (obsts$min / 5 ) ) * 5 * 60 ) (where obsts is the sql timestamp converted into a DateTime object) Then I tried aggregate(df,by=obsfivemin,cor), but that seemed to pass just a single column at a time to cor, not the entire dat...