################################################################
# name:get.var.labels
# from http://stackoverflow.com/a/10261534
# this creates the $variable.labels attribute
get.var.labels = function(data) {
if(!require(Hmisc)) install.packages('Hmisc', dependencies = TRUE); require(Hmisc)
a = do.call(llist, data)
tempout = vector("list", length(a))
for (i in 1:length(a)) {
tempout[[i]] = label(a[[i]])
}
b = unlist(tempout)
structure(c(b), .Names = names(data))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.