read.sss | R Documentation |
This function reads and parses a .sss
XML metadata file as well as its
associated .asc
data file. The sss standard defines a standard survey
structure.
read.sss(
sssFilename,
ascFilename = guess_asc_filename(sssFilename),
sep = "_",
verbose = FALSE
)
sssFilename |
Character string: name of .sss file containing the survey metadata |
ascFilename |
Character string: name of .asc (or .csv) file containing survey data. If this is not provided, guesses the filename using |
sep |
Character vector defining the string that separates question and
subquestion labels, e.g. |
verbose |
If TRUE, prints messages when reading data files. Defaults to FALSE. |
A data frame with one element (column) for each variable in the data set.
The resulting data.frame contains several attributes:
variable.labels
: a named list of value labels with one element per
variable, either NULL or a named character vector
label.table
: a named list with one element per question. Every element is
a named character string that contains the label codes for that question.
https://triple-s.org/
Other read functions:
readSSSdata()
,
readSSSmetadata()
example <- system.file("sampledata/sample-1.sss", package = "sss")
# read.sss() automatically guesses the data file name
read.sss(system.file("sampledata/sample-1.sss", package = "sss"))
read.sss(system.file("sampledata/sample-2.sss", package = "sss"))
read.sss(system.file("sampledata/sample-3.sss", package = "sss"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.