October 2017
Beginner to intermediate
236 pages
7h 38m
English
Let's take a look at the following steps to learn about writing R using the switch function:
switch(statement, list)
sym <- 1 switch(sym, function(x) c(mean=mean(x), std=sd(x)),function(x) c(med=median(x), mad=mad(x)))
Fun1 <- switch(sym, function(x) c(mean=mean(x), std=sd(x)), function(x) c(med=median(x), mad=mad(x))) x <- c(13, ...