Module #2 Assignment
Evaluating A Function VaShay M. Carpenter Objectives Learn how to import data into RStudio. Review foundational R programming concepts and GitHub workflows . Practice function debugging and evaluation in R. Evaluate myMean Function Use the vector: assignment2 <- c(16, 18, 14, 22, 27, 17, 19, 17, 17, 22, 20, 22) Consider this function: myMean <- function(assignment2) { return(sum(assignment) / length(someData)) } In RStudio, run myMean(assignment2) and record the output or error. On both your blog and GitHub repository, post: The result or error message from testing myMean . An explanation of why the function fails or succeeds (hint: variable names). A good function should take an input x, process x, and return a result like a "black box". If your function is looking for a specific name like assignment2 but that variable name isn't defined inside the function's local scope, it will break or produce unpredictable results....