View source: R/read_stata_data.R
read_stata_data | R Documentation |
Read Stata data file
read_stata_data(file, label = FALSE)
file |
The path to the Stata data file. |
label |
Logical indicating whether to use variable labels as column names (default is FALSE). |
A data frame containing the Stata data, with labeled variables converted to factors.
read_spss_data()
which reads SPSS data file and converts labelled variables into factors.
# Read Stata data file without converting variable labels as column names
file_path <- system.file("extdata", "Wages.dta", package = "bulkreadr")
data <- read_stata_data(file = file_path)
data
# Read Stata data file and convert variable labels as column names
data <- read_stata_data(file = file_path, label = TRUE)
data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.