knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

havenmisc

A collections of functions related to the haven package, but not worthwhile to belong there. They will therefore live here instead.

Installation

You can install forcatsmisc from github with:

# install.packages("remotes")
remotes::install_github("philstraforelli/havenmisc")

Examples

labels_df()

For now, there is only one function avaialble, labels_df(). It takes a data frame imported using haven::read_sav() as input, and returns a data frame with the variable names and the labels meta data attached to each variable.

gss_data <- haven::read_sav(system.file("extdata", "GSS2016.sav", package = "havenmisc"))
havenmisc::labels_df(gss_data)


philstraforelli/havenmisc documentation built on July 3, 2023, 9:53 a.m.