Skip to content

Extra functions related to the haven package

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

pstraforelli/havenmisc

Repository files navigation

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("pstraforelli/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)
#> # A tibble: 5 x 2
#>   name        label                                                        
#>   <chr>       <chr>                                                        
#> 1 SATJOBHV    Job satisfaction                                             
#> 2 SECTOR      Type of college respondent attended                          
#> 3 EFTOTLT     Total number of students enrolled in college respondent atte~
#> 4 BARATE      Rate of BA degree earning in college respondent attended     
#> 5 GRADTOUNDER Ratio of graduate students to undergraduate students in coll~

About

Extra functions related to the haven package

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages