Exercises
For each line of code below, please articulate what are the function names, inputs/arguments, how the inputs are passed to the functions, and what are the consequences or outputs of the function.
hint: ?FUNCTION_NAME
would be helpful for some of these
log(10, base=10)
getwd()
print("hello world")
sample(10)
demo_var <- 3.1415
(hint:?"<-"
)- Is subsetting,
[]
a function? (hint:?"["
) If yes, explain its elements in the exampledice <- c(1, 2, 3, 4, 5, 6) dice[4]