From: Michael Bach <phaebz_at_gmail.com>

Date: Thu, 24 Mar 2011 15:29:15 +0200

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. Received on Thu 24 Mar 2011 - 13:34:56 GMT

Date: Thu, 24 Mar 2011 15:29:15 +0200

x <- seq(1,100,1)

dx <- as.POSIXct(x*900, origin="2007-06-01 00:00:00")
dfx <- data.frame(dx)

Now to play around for example:

subset(dfx, dx > as.POSIXct("2007-06-01 16:00:00"))

Well that did not work. But why does the following work?

14 > as.POSIXlt(dx)$hour & as.POSIXlt(dx)$hour < 10

Is there something I miss about subset()? Or is there even another way of aggregating over an hourly time interval in a nicer way?

Best Regards,

Michael Bach

[[alternative HTML version deleted]]

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. Received on Thu 24 Mar 2011 - 13:34:56 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Thu 24 Mar 2011 - 16:20:23 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*