earthlab / qtoolkit

An R package that allows you to efficiently access, plot and analyze survey data via the Qualtrics API.
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

vignettes error - get_survey() #2

Closed lwasser closed 6 years ago

lwasser commented 6 years ago

@1papaya currently i'm getting an error with get survey(). following the vignette i can't seem to get a list of surveys using get_survey(). please have a look.

> connect_qualtrics("cuboulder")
> s_list <- get_survey()
Error in get_survey() : No surveys matched with name ''
> s_list <- get_survey(name = "week")
Error in get_survey(name = "week") : No surveys matched with name 'week'
1papaya commented 6 years ago

Updated man pages & vignettes according to changes made in c803940.

get_survey() is now get_surveys() and defaults to matching partial names of available surveys. For instance, what you wrote about will now work, provided you call get_surveys().

> s_list <- get_surveys()
> s_list <- get_surveys("week")

load_survey() provides a shortcut to search for and load the name of a particular survey, and can also be passed a DF returned by get_surveys() and filtered by the user. It defaults to only load exact matches of surveys, but can also be used to wildcard match and return list of surveys.

> survey1 <- load_survey("week-1-survey")
> survey1 <- load_survey("SV_surveyidhere")

## using DF of surveys returned by get_surveys()
> survey1 <- load_survey(s_list)

## load list of surveys by wildcard
> surveys <- load_survey("week", match.exact = FALSE)

The rationale behind these changes: