On Thu, Mar 24, 2011 at 9:29 AM, Michael Bach wrote:
> Dear R users,
>
> Given this data:
>
> 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"))
>
> Ok. Now fo
On Mar 24, 2011, at 10:02 AM, Michael Bach wrote:
> Hi David,
>
> your approach selects the datapoints between "2007-06-01 10:00:00"
> and "2007-06-01 14:00:00" true enough. However, my real dataset is
> for several months and years. So I need data points between 10:00:00
> and 14:00:00 onl
>
> I wanted to point out that this is a little easier to express with the
> lubridate package:
>
> subset(dfx, dx > ymd("2007-06-01") & hour(dx) > 14 & hour(x) < 10)
>
Thanks, will have a look at it..
>
> but I presume you meant:
>
> subset(dfx, dx > ymd("2007-06-01") & hour(dx) > 10 & hour(x)
@Kenn: Yeah I have a way of loosing concentration when fiddling around and
trying to get it work. Thanks for pointing out that I supplied a third
argument when I wanted an additional test in the second argument instead.
Also my selection choices indeed do not make any sense, no wonder your
"parser"
On Thu, Mar 24, 2011 at 8:29 AM, Michael Bach wrote:
> Dear R users,
>
> Given this data:
>
> 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"))
>
> Ok. Now fo
On 03/24/2011 06:29 AM, Michael Bach wrote:
Dear R users,
Given this data:
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"))
Ok. Now for some reason I want to extract
On Thu, Mar 24, 2011 at 1:29 PM, Michael Bach wrote:
> Dear R users,
>
> Given this data:
>
> 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"))
>
> Ok. Now fo
Hi David,
your approach selects the datapoints between "2007-06-01 10:00:00"
and "2007-06-01 14:00:00" true enough. However, my real dataset is for
several months and years. So I need data points between 10:00:00 and
14:00:00 only - independent of the date. I thought the name for that is
"aggregat
On Mar 24, 2011, at 9:29 AM, Michael Bach wrote:
Dear R users,
Given this data:
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"))
Ok. Now for some reason I want t
Dear R users,
Given this data:
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"))
Ok. Now for some reason I want to extract the datapoints between hours
10:00:00 and 1
10 matches
Mail list logo