[R] Subset a datafram according to time
NickNz125
nickthomas125 at gmail.com
Fri Feb 10 03:05:22 CET 2012
I want the combine and align by time DATAFRAME1 with DATAFRAME2. DF1 is
second observations and DF2 6 minutes observations want to extract the ObsrG
data from DF1 to match the times in DF2. Therefore getting DF3 with
Observations (Obsrg) extracted from DF1 to match the times in DF2.
DATAFRAME1
Date Time ObsrG
02/08/2011 00:00:01 1.167
02/08/2011 00:00:02 1.788
02/08/2011 00:00:03 1.677
02/08/2011 00:00:04 1.313
02/08/2011 00:00:05 1.110
02/08/2011 00:00:06 1.248
02/08/2011 00:00:07 1.187
DATAFRAME2
Date Time Obsr
02/08/2011 00:00 1.154
02/08/2011 00:06 1.041
02/08/2011 00:12 1.090
02/08/2011 00:18 1.093
02/08/2011 00:24 1.100
02/08/2011 00:30 1.098
02/08/2011 00:36 1.177
DATAFRAME 3
Date Time Obsr ObsrG
02/08/2011 00:00 1.154 2.456
02/08/2011 00:06 1.041 2.341
02/08/2011 00:12 1.090 1.893
02/08/2011 00:18 1.093 1.783
02/08/2011 00:24 1.100 1.689
02/08/2011 00:30 1.098 1.768
02/08/2011 00:36 1.177 1.892
--
View this message in context: http://r.789695.n4.nabble.com/Subset-a-datafram-according-to-time-tp4372293p4375096.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list