knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

The sss package makes it easy to read and parse survey data in the sss (triple-s) file format.

Example

library(sss)
library(dplyr, quietly = TRUE, warn.conflicts = FALSE)

Read a survey file

dat <- read.sss("sample.sss", "sample.asc")

Display the results.

dat %>% 
  as_tibble()

And view the structure of the file. Note that some columns have additional attributes with variable.labels and lable.table, e.g. Q99:

str(dat)

Extract the variable labels:

attr(dat, "variable.labels")

And the label table for question 2:

attr(dat, "label.table")$`2`


andrie/sss documentation built on April 1, 2024, 6:45 p.m.