SurveySolutions2R: Read in Survey Data Exported In Tabular Format from Survey...

View source: R/SS2R.R

SurveySolutions2RR Documentation

Read in Survey Data Exported In Tabular Format from Survey Solutions HQ

Description

Takes a zip file produced by the Data Export Menu from Survey Solutions HQ and imports all data frames in the R environment, assigns factor levels and adds full text for variable labels using label

Usage

SurveySolutions2R(zipfile, encoding = "UTF-8", dupLabels = TRUE,
  saveData = FALSE, ...)

Arguments

zipfile

The path of a zip file produced in the Data Export Menu for the Main Survey Data in "Tabular Format".

encoding

default is "UTF-8". Other possible options are "unknown" and "Latin-1". Note: it is not used to re-encode the input, rather enables handling of encoded strings in their native encoding.

dupLabels

default is TRUE. If TRUE, and the same label is used for multiple codes within a factor, then the output file will not distinguish between the same code. If FALSE then new unique labels will be created by concatenating the label and the code.

saveData

default is FALSE. If TRUE then filename will be derived from input file location. Can also be an explcit filename.

...

Additional import options for fread

Value

A series of data frames

Examples

#Using data downloaded from the Survey Solutions Demo Server
#https://demo.mysurvey.solutions
#Login: Headquarters1 Password: Headquarters1
SurveySolutions2R("Example-FP_31_Tabular_All.zip",saveData=FALSE)

stats4sd/SurveySolutions2R documentation built on Oct. 18, 2023, 8:28 p.m.