DictionarySPSS: A SPSS Data Dictionary Function

Description Usage Arguments Examples

View source: R/DictionarySPSS.R

Description

This function creates a .txt data dictionary from an SPSS .sav file read into R using the foreign package. It writes the variable labels and value labels stored as attributes within the R data object to an external file.

Usage

1
DictionarySPSS(x, file = "DataDictionary.txt")

Arguments

x

A dataframe read in using the "read.spss()" command from the foreign package. Must have "to.data.frame=TRUE" and works best if "use.value.labels=FALSE"

file

The file name and location to which the data dictionary should be written. Defaults to "DataDictionary.txt" in the current working directory.

Examples

1

ajhmohr/datadictionary documentation built on Aug. 23, 2021, 10 a.m.