Load data from LamaPoll survey
Source:vignettes/articles/get_lamapoll_data.Rmd
get_lamapoll_data.Rmd
Data from LamaPoll surveys can be loaded using the
get_lamapoll_data()
function.
Set Options
Before the data can be loaded, an email address and a LamaPoll API key must be entered in the options as a first step. The email address must be mapped to a LamaPoll account.
Attention: Please never share R scripts that contain your LamaPoll API key.
Get a list of your LamaPoll surveys
You can use the get_surveylist function to retrieve a list of LamaPoll surveys associated with your user account. The output is in a data frame.
surveys_online <- get_surveylist(status = "online")
You can use the status
property to determine whether
only questionnaires that are online, offline or in progress (inwork) are
displayed. The default value is online.
Load Data
After the options have been set, the function for loading the data can be executed:
testdata <- get_lamapoll_data(poll_name = "your-poll-name")
Under poll_name
the name of the LamaPoll survey must be
specified. In the default settings all complete responses are
loaded.
Specify responses that are loaded
The responses that are loaded can be customized with the properties of the function. The following options are available:
-
only_completed
: If this property is set to TRUE (default) only complete responses are loaded. If the property is set to FALSE, all responses are loaded (started and completed).