Skip to contents

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 the response_at column.

ended_at

Date (YYYY-MM-DD). The date when the survey ended. If NULL, it is set to the maximum date in the response_at column.

snapshot_data

Logical. If TRUE, a snapshot of the data is taken. If FALSE, snapshot without data is taken. If NULL, no snapshot is taken.