View source: R/read_spss_data.R
read_spss_data | R Documentation |
read_spss_data()
is designed to seamlessly import data from an SPSS data (.sav
or .zsav
) files. It converts labelled variables into factors, a crucial step that enhances the ease of data manipulation and analysis within the R programming environment.
read_spss_data(file, label = FALSE)
file |
The path to the SPSS data file. |
label |
Logical indicating whether to use variable labels as column names (default is FALSE). |
A tibble containing the data from the SPSS file.
read_stata_data()
which reads Stata data file and converts labelled variables into factors.
# Read an SPSS data file without converting variable labels as column names
file_path <- system.file("extdata", "Wages.sav", package = "bulkreadr")
data <- read_spss_data(file = file_path)
data
# Read an SPSS data file and convert variable labels as column names
data <- read_spss_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.