R/Iconv.R

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

Documented in Iconv Iconv.annotation Iconv.character Iconv.data.set Iconv.importer Iconv.item Iconv.value.labels

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

Iconv.character <- function(x,from="",to="",...){
  iconv(x,from=from,to=to,...)  
}

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 memisc package in your browser

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

memisc documentation built on April 14, 2025, 9:07 a.m.