Skip to contents

Apply basic steps to transform source Forsta survey data. Sets the id, time and ignore types, and adds a response_duration_min column — the Forsta qtime duration (seconds) expressed in minutes.

Usage

step_prepare_forsta(
  x,
  secondary_ids = c("record", "transaction_id"),
  vars_ignore = c("vos", "vosr15oe", "vbrowser", "vbrowserr15oe", "vmobiledevice",
    "vmobileos", "start_date", "vdropout", "source", "list", "dec_lang", "user_agent",
    "dcua", "url", "session", "markers", "status", "vlist"),
  snapshot_data = FALSE
)

Arguments

x

Survey data

secondary_ids

Character vector of secondary ID column names.

vars_ignore

Character vector of column names to ignore (survey plumbing, markers, status and vlists — all folded into the ignore type).

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.

Examples

if (FALSE) { # \dontrun{
x <- forsta_get_data("selfserve/57a/250405") |> step_prepare_forsta()
} # }