Hello R-List,

I have a question about recoding from a date time object.  I have tried using 
as.POSIXct objects and Chron Objects, but I can get the what I want.

I need to create a new variable from a date-time object, adding "Office Time" 
for those events that happens between 08:00:00 to 18:00:00 and "Out of Office" 
all the others, but not including weekends. I have created a fake data.

tmp <- seq(as.POSIXct('2011-08-01 13:00'), as.POSIXct('2011-09-02 03:00'), 
by='45 min')

Is there any valid way to do it? I have spend so much time without any good 
luck and I don't have any good code to show!
Thanks in advance!
José

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to