qualtrics_get_metadata: Download Metadata for a Survey

Description Usage Arguments Author(s) Examples

View source: R/qualtrics_get_metadata.R

Description

Using this function, you can retrieve metadata about your survey. This information includes question metadata (type, options, choices etc), number of responses, general metadata, survey flow etc.

Usage

1
2
3
metadata(surveyID)

qualtrics_get_metadata(surveyID)

Arguments

surveyID

String. Unique ID for the survey you want to download. Returned as 'id' by the getSurveys function.

Author(s)

Jasper Ginn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
# Register your Qualtrics credentials if you haven't already
# Note that you need to pass both the 'api_token' and 'root_url'
# parameters if you call this function for the first time.
registerOptions(api_token = "<YOUR-API-TOKEN>",
                base_url = "<YOUR-ROOT-URL>")
# Get an overview of surveys
surveys <- getSurveys()
# Get metadata for a survey
md <- metadata(surveyID = surveys$id[6])
# Get metadata with specific elements
md_specific <- metadata(surveyID= id, get=list(questions = FALSE, flow = TRUE))
# Get specific question metadata
question_specific <- metadata(surveyID=id,
                              get=list(questions = TRUE),
                                       questions = c("Q1", "Q2"))

# Example of a metadata file
file <- system.file("extdata", "metadata.rds", package = "qualtRics")
# Load
metadata_ex <- readRDS(file=file)

## End(Not run)

JasperHG90/qualtRics documentation built on May 7, 2019, 10:33 a.m.