Skip to content

Instantly share code, notes, and snippets.

@bquast
Last active May 9, 2016
Embed
What would you like to do?
# 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