Re: [R] Trouble converting hourly data into daily data

2011-12-23 Thread Sean Baumgarten
Hi Jean, Thanks for the help. I couldn't quite get the results I needed with the merge command, but I ended up using the following work-around: Weather - read.csv(Weather.csv) Weather$diff.time - abs(.5 - Weather$TimeNumeric) agg - aggregate(diff.time ~ Date, data = Weather, FUN = which.min)

Re: [R] Trouble converting hourly data into daily data

2011-12-19 Thread Jean V Adams
Sean Baumgarten wrote on 12/14/2011 06:38:08 PM: Hello, I have a data frame with hourly or sub-hourly weather records that span several years, and from that data frame I'm trying to select only the records taken closest to noon for each day. Here's what I've done so far: #Add a column

[R] Trouble converting hourly data into daily data

2011-12-14 Thread Sean Baumgarten
Hello, I have a data frame with hourly or sub-hourly weather records that span several years, and from that data frame I'm trying to select only the records taken closest to noon for each day. Here's what I've done so far: #Add a column to the data frame showing the difference between noon and