activity_duration(
data = NULL,
db = NULL,
participant_id = NULL,
confidence = 70,
direction = "forward",
start_date = NULL,
end_date = NULL,
by = c("Total", "Day", "Hour")
)
A tibble containing a column 'activity' and a column 'duration' for the hourly activity duration.
A data frame containing the activity data. See get_data for retrieving activity data from an mpathsenser database.
A database connection to an m-Path Sense database.
A character string identifying a single participant. Use
get_participants
to retrieve all participants from the database.
Leave empty to get data for all participants.
The minimum confidence (0-100) that should be assigned to an observation by Activity Recognition.
The directionality of the duration calculation, i.e. \(t - t_{t-1}\) or \(t_{t+1} - t\).
Optional search window specifying date where to begin search. Must be convertible to date using as.Date. Use first_date to find the date of the first entry for a participant.
Optional search window specifying date where to end search. Must be convertible to date using as.Date. Use last_date to find the date of the last entry for a participant.
Either 'Total', 'Hour', or 'Day' indicating how to summarise the results.