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)
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
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
3 matches
Mail list logo