For this assignment, we are evaluating the myMean function using the vector assignment2, shown below.
When running myMean(assignment2), we get the error message:
The error message states that ‘assignment‘ can not be found. This is because it does not exist! We created assignment2, and since the variable names are different, we must edit myMean to match. This is the same for someData, since we did not create a variable or vector with this name, it does not exist and is not defined. We need to correct the function.
Now that the variable names are correct, we can run the updated function myMean(assignment2), and get this output:
Leave a Reply