pull_data: Pull Surveycto data in R

Description Usage Arguments Value Examples

View source: R/pull_data.R

Description

This function pulls data from surveycto using their api. Typically, numeric fields will be read as character by R when downloaded using the api. User will manually need to convert the field types as necessary.

Usage

1
pull_data(formid, servername, username, password, key = NULL, newserver = T)

Arguments

formid

character: is the Surveycto form id.

servername

character: is the name of the Surveycto server.

username

character: is the username for the account being used to login to the server.

password

character: is the password for the account being used to login to the server.

key

character: name of the private encryption file, if applicable. If it doesn't contain an absolute path, the file name is relative to the current working directory, getwd(). If the form is encrypted and a key is not provided, only the fields marked as publishable will be returned. Defaults to NULL.

newserver

logical: TRUE for surveycto version 2.70 and above. FALSE otherwise. Default is TRUE.

Value

A dataframe containing the formdata in wide format

Examples

1
2
gp_survey<- pull_data("gp_survey_v1","gpcovid19","user(at)gmail.com","difficultpassword$793")
gp_survey_encrypted<-pull_data("gp_survey_v1","gpcovid19","user(at)gmail.com","difficultpassword$793", key="C:/Users/Dropbox/gp_project/encryption_keys/gpkey_PRIVATEDONOTSHARE.pem")

Anoopsinghrawat/snxt documentation built on Sept. 16, 2020, 1:46 a.m.