from_labelled: Flatten SPSS input

Description Usage Arguments Note Author(s) Examples

Description

When reading SPSS files with read_data, se this function to convert labelled to factor and remove additional attributes from the data. The function returns a list (mm and df) and the additional information is stored in mm. The process can be returned when writing spss files with write_data (if changes to the data are reflected in the mm), but it is better to not avoid using this function when doing light data cleaning and writing it after.

Usage

1

Arguments

df

A data.frame as returned from read_data or haven::read_sav. data.frame is returned from the function.

Note

The results are error-prone. Carefully check the results.

Author(s)

Kristian D. Olsen

Examples

1
read_data("test.sav") %>% from_labelled()

itsdalmo/reporttool documentation built on May 18, 2019, 7:11 a.m.