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

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1745508702, '3.145.36.157', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/packages/broman/index(55): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78