https://github.com/cran/Hmisc
Raw File
Tip revision: 1a0c84d47483e85424f3a4b9fa735b55303bee0f authored by Charles Dupont on 17 April 2006, 16:38:31 UTC
version 3.0-12
Tip revision: 1a0c84d
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