Set time variables in a dataframe
Usage
step_set_time(
x,
response_at = NULL,
response_duration = NULL,
started_at = NULL,
ended_at = NULL,
snapshot_data = FALSE
)Arguments
- x
A survey tibble.
- response_at
Character. The name of the column containing the response date.
- response_duration
Character. The name of the column containing the response duration in seconds.
- started_at
Date (YYYY-MM-DD). The date when the survey started. If
NULL, it is set to the minimum date in theresponse_atcolumn.- ended_at
Date (YYYY-MM-DD). The date when the survey ended. If
NULL, it is set to the maximum date in theresponse_atcolumn.- snapshot_data
Logical. If
TRUE, a snapshot of the data is taken. IfFALSE, snapshot without data is taken. IfNULL, no snapshot is taken.