read_bos: Import spss .sav data from Online Surveys (BOS)

Description Usage Arguments Details Value Examples

Description

Import spss .sav data from Online Surveys (BOS)

Usage

1
read_bos(filename, headers = "both", sep = "---", pad = 3)

Arguments

filename

path to SPSS .sav file from BOS

headers

Choice of "label", "code" or "both"

sep

separator for question code and question text

pad

number of digits to pad question codes with

Details

Imports an SPSS .sav file saved from Online Surveys (BOS) then extracts meta data and joins it to create tibble with long form question names as headers and explicit data in cells. headers argument allows choice original column codes ('code') padded with leading zeros, text label ('label') or both ('both') separated by separator text ('sep').

Value

Returns a tibble with URN and column per question

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
file <- bossier_example("bossier_example.sav")

dat <- read_bos(file, sep = "---", pad = 3)
head(dat)

dat <- read_bos(file, headers = "code", pad = 3)
head(dat)

dat <- read_bos(file, headers = "label")
head(dat)

ianhandel/bossier documentation built on May 29, 2019, 11:03 p.m.