https://github.com/cran/Hmisc
Raw File
Tip revision: df801917af3233553d4d0b9bf0071d24c79343f2 authored by Charles Dupont on 09 January 2006, 20:04:58 UTC
version 3.0-8
Tip revision: df80191
data.frame.labelled.s
## For every object in a data frame that has a 'label' attribute, make it
## class 'labelled'

data.frame.labelled <- function(object)
{
  for(n in names(object))
    if(length(attr(object[[n]],'label')))
      attr(object[[n]],'class') <- c('labelled',attr(object[[n]],'class'))

  object
}
back to top