[R] Subset a datafram according to time
Jim Holtman
jholtman at gmail.com
Fri Feb 10 07:25:12 CET 2012
In the first line of dataframe 3, I don't see where the value of 2.456 for ObsrG came from. Can you give us a hint of how that was computed?
Sent from my iPad
On Feb 9, 2012, at 21:05, NickNz125 <nickthomas125 at gmail.com> wrote:
> 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.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list