Stuck at the 55% completion exercise. Trying to use the evaluate function defined as follows:
evaluate <- function(func, dat){
func(dat)
}
Stuck at this next exercise:
Let's take your new evaluate() function for a spin! Use evaluate to find the standard deviation of the vector c(1.4,
| 3.6, 7.9, 8.8).
My input is
> evaluate(sd, c(1.4, 3.6, 7.9, 8.8))
I keep getting the error
Error in func(dat) : could not find function "func"
I’ve tried restarting swirl and using the following line of code, but to no avail.
> evaluate(func = sd, dat = c(1.4,3.6,7.9,8.8))
Please help.
New contributor
thecountofmontecristo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.