Skip to contents

Fetches responses and applies so-called "R-syntax" transformation script from LimeSurvey pertaining factor levels and items labels (those are readily available in RStudio data frame preview and can be extracted using attr(.data, "label")). By default, the function attempts to "clean" the labels (clean_labels argument), keeping only the content inside [...], if there are any.

Usage

ls_responses(
  survey_id,
  clean_labels = TRUE,
  lang = "cs",
  part = "all",
  standardize_dates = TRUE,
  ...
)

Arguments

survey_id

integer, ID of the survey (as found with ls_surveys, e.g.).

clean_labels

logical, whether to clean labels of subquestions from repeating parts. Defaults to TRUE.

lang

character, ISO 639 language code, default to cs.

part

character, completion status, either complete, incomplete or all (the default).

standardize_dates

logical, whether to standardize dates to Date.

...

other named arguments used by "export_responses" method. Use at your own risk.

Value

A tibble, or raw object if server response cannot be reasonably coerced to a tibble.

Examples

if (FALSE) { # \dontrun{
ls_responses(123456)
} # }