Is there a simple way to obtain the time of day in R? I want the time of day for computational purposes, not for display. I want to be able to create code like the following:
if (time_of_day >= 22:00 & time_of_day <= 06:00) then X otherwise Y I realize I could parse a date/time object and extract the time, but hopefully other people have already done this, or there is a straightforward representation of time of day in R that I have not been able to find in the documentation. Thanks. [[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.