DictionaryStata: A Stata Data Dictionary Function

Description Usage Arguments Examples

View source: R/DictionaryStata.R

Description

This function creates a .txt data dictionary from a Stata .dta 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
DictionaryStata(x, file = "DataDictionary.txt")

Arguments

x

A dataframe read in using the "read.dta()" command from the foreign package.

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.