knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
A collections of functions related to the haven package, but not worthwhile to belong there. They will therefore live here instead.
You can install forcatsmisc from github with:
# install.packages("remotes") remotes::install_github("philstraforelli/havenmisc")
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.