Skip to content

Instantly share code, notes, and snippets.

@bquast
Last active May 9, 2016 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bquast/ed0399a2e3ca5316c9f7 to your computer and use it in GitHub Desktop.
Save bquast/ed0399a2e3ca5316c9f7 to your computer and use it in GitHub Desktop.
# create explore function
# to be applied to data.frames created by importing using the haven package
# https://cran.r-project.org/package=haven
# also available in the explore package:
# https://github.com/bquast/explore
explore <- function(data) {
description <- sapply(data, attr, "label")
variables <- names(description)
description <- paste('#', description)
data.frame(variables, description)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment