Skip to contents

Reads a CSV file exported from Qualtrics (with "Use choice text" enabled) and returns a data frame formatted for downstream processing with reshape_projoint.

Usage

read_Qualtrics(.file, .metadata_rows = NULL)

Arguments

.file

A character string giving the path to a Qualtrics CSV file.

.metadata_rows

Number of metadata rows after the CSV header. The default, NULL, detects current Qualtrics exports (question text plus an ImportId row) and legacy exports (question text only). Supply a non-negative integer to override detection.

Value

A tibble containing response rows only. Column names and physical column order are preserved from the Qualtrics export.

See also

Examples

# \donttest{
# Write a tiny dummy Qualtrics-style CSV to a temp file
tmp <- tempfile(fileext = ".csv")
readr::write_csv(
  data.frame(Q1 = c("Choice Text", "{\"ImportId\":\"QID1\"}", "A", "B")),
  tmp
)
# Read it back in
df <- read_Qualtrics(tmp)
head(df)
#> # A tibble: 2 × 1
#>   Q1   
#>   <chr>
#> 1 A    
#> 2 B    
# }