Search notes:

R package: broman

switchv

switchv is a function that allows to use the switch statement with vectors.
library(broman)

en <- c('one', 'four', 'two', 'three', 'one', 'three');

gr<-switchv(en ,
        'one'   = 'eins'  ,
        'two'   = 'zwei'  ,
        'three' = 'drei'  ,
        'four'  = 'vier'  ,
        'five'  = 'fünf'  );

cat(gr, sep="\n");
Github repository about-r, path: /packages/broman/switchv.R

See also

R packages

Index