October 2017
Beginner to intermediate
236 pages
7h 38m
English
Let’s start with the function name meanSe to write the function. Here is the complete code of the function:
meanSe <- function(numVec){ if(is.numeric(numVec) & is.vector(numVec)){ avg <- mean(numVec) std <- sd(numVec) se <- std/sqrt(length(numVec)) out <- paste("Mean of the input vector is = ", paste(avg), " with a standard error = ", paste(se), sep = "") return(out) } }