Predict results of these function calls
Exercise Type: Prediction
Instructions
Predict the return value of the function calls based on these definitions:
f1 <- function(x) x^2
f2 <- function(a, b) a - b + 1
f3 <- function(x){
val <- paste0("R would say '", x, "'.")
return(val)
}
f4 <- function(x){
return(x == 4)
}
A
f1(10)
B
f2(4, 3)
C
f3("wicked!")
D
f4(4)
E
f4(NA)