Search notes:

R function: ifelse

abc <- c(4, 2, 9, 3, 6)
ifelse(abc>5, "GT", "LE")
# [1] "LE" "LE" "GT" "LE" "GT"
Github repository about-r, path: /functions/ifelse.R

See also

ifelse used as an alternative to the switch statement to prevent the Error in switch … EXPR must be a length 1 vector.
Index to (some) R functions

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...', 1742012766, '3.144.139.191', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/ifelse(43): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78