Working with "period" class data

44 views
Skip to first unread message

Andy O

unread,
Jan 12, 2015, 3:16:21 PM1/12/15
to lubr...@googlegroups.com
In my data I have arrival and departure date/times and I have manipulated my data to the point where I have the following (subset):

[1] "4H 39M 0S" "1H 58M 0S" "53M 0S"    "5H 22M 0S" "2H 14M 0S" "2H 54M 0S" "6H 57M 0S" "4H 49M 0S" "3H 40M 0S"
[10] "2H 5M 0S"

which represents their length of stay (LOS). {this was performed by the following: as.period(interval(arrival date/time, departure date/time))}

However, I am having difficulty working with the data now that I have it in this format.  For example, one question I would like to see is how much LOS has varied given other various factors in the data frame. Or another question would be to see the distribution of LOS.

I have tried to convert the format to other date formats (i.e. POSIX*, Date, etc.) but get errors.  Is there a simple what to convert this period of time to a integer so that I may perform more analysis? Do I need to do something different than converting to a period class to get at the interval length or LOS?

Thanks for the help!

Andy O.
 
Reply all
Reply to author
Forward
0 new messages