| raw2tact {heR.Activities} | R Documentation |
Convert raw activity pattern data containing beginning and ending times and multiple sets of time-activity event codes for multiple individuals to a multiple time-activity object.
raw2tact(index, tbeg, tend, events, hhmm = TRUE, verbose = TRUE)
index |
vector containing identifying labels unique to each individual |
tbeg |
vector containing beginning times |
tend |
vector containing ending times |
events |
list containing sets of event vectors |
hhmm |
logical, interpret times in HHMM 24-hour clocktime or not |
verbose |
logical, output information on each individual during processing or not |
`tbeg' is the beginning time vector; `tend' is the ending time vector; and `events' is a list of sets of event tags/codes. `index' is the grouping variable vector taking on a different value for each different individual. Times, the index, and event sets must have identical lengths.
if `hhmm=TRUE' (the default), then the beginning and ending times are interpreted as 24-hour HHMM clocktime format, where HH = 0 to 23 hours and MM = 0 to 59 minutes. Otherwise the the times are in arbitrary units of continuous time.
Important: Events for each individual are assumed to be sorted in increasing time for `hhmm=TRUE'. The raw times are only sorted when `hhmm=FALSE', i.e., for continous elapsed time input, since "2312" could occur after "0012" if events fall on different days.
For gaps in a time series, i.e., when some tbeg's besides the first one do not fall immediately after a tend, event elements with NA values are inserted.
A multiple time-activity object
Neil Klepeis