Table of Contents
R - Switch
Articles Related
R - Flow (Control Structure)
Example
x <- "three"; y <- 0; switch(x, one = {y <- 5}, two = {y <- 12}, three = {y <- 432}) y
432