Module 2. Assignment: Function Debugging and Evaluation in R
Assignment Instructions:
The initial test results can be found below and included the following error message: "Error in myMean(assignment2) : object 'assignment' not found".
Now, a corrected version of myMean that correctly returns the mean of assignment2 will be computed.
The mean is 19.07692. In this iteration, we changed the parameters to include 'data' and both sum(data) and length(data) use the same parameter. Consistent variable names are important in R programming to ensure data integrity and cohesion!
Comments
Post a Comment