Debian Codegraph @

R/charTrans.R

raw
1 charTrans <- function(x, old = "", new = "", ...) UseMethod("charTrans")
2
3 charTrans.character <- function(x, old = "", new = "", ...)
4 chartr(old = old, new = new, x = x)
5
6 charTrans.importer <- function(x, old = "", new = "", ...){
7 [email protected] <- lapply([email protected], charTrans.item, old = old, new = new, ...)
8 return(x)
9 }
10
11 charTrans.item <- function(x, old = "", new = "", ...){
12 if(length(ann <- annotation(x)))
13 annotation(x) <- charTrans.annotation(ann, old = old, new = new, ...)
14 if(length(vl <- labels(x)))
15 labels(x) <- charTrans.value.labels(vl, old = old, new = new, ...)
16 return(x)
17 }
18
19 charTrans.value.labels <- function(x, old = "", new = "", ...){
20 [email protected] <- chartr(x = [email protected], old = old, new = new, ...)
21 return(x)
22 }
23
24 charTrans.annotation <- function(x,old="",new="",...){
25 [email protected] <- chartr(x = [email protected], old = old, new = new, ...)
26 return(x)
27 }
28
29 charTrans.data.set <- function(x,old="",new="",...){
30 [email protected] <- lapply([email protected], charTrans.item, old = old, new = new, ...)
31 return(x)
32 }