R/Iconv.R

Defines functions Iconv Iconv.importer Iconv.item Iconv.value.labels Iconv.annotation Iconv.data.set

Iconv <- function(x,from="",to="",...) UseMethod("Iconv")

Iconv.importer <- function(x,from="",to="",...){
  x@.Data <- lapply(x@.Data,Iconv.item,from,to,...)
  return(x)
}

Iconv.item <- function(x,from="",to="",...){
  if(length(ann <- annotation(x)))
    annotation(x) <- Iconv.annotation(ann,from=from,to=to,...)
  if(length(vl <- labels(x)))
    labels(x) <- Iconv.value.labels(vl,from=from,to=to,...)
  return(x)
}

Iconv.value.labels <- function(x,from="",to="",...){
  x@.Data <- iconv(x@.Data,from=from,to=to,...)
  return(x)
}

Iconv.annotation <- function(x,from="",to="",...){
  x@.Data <- iconv(x@.Data,from=from,to=to,...)  
  return(x)
}

Iconv.data.set <- function(x,from="",to="",...){
  x@.Data <- lapply(x@.Data,Iconv.item,from,to,...)
  return(x)
}

Try the codebooks package in your browser

Any scripts or data that you put into this service are public.

codebooks documentation built on May 2, 2019, 5:26 p.m.