Module #2 Intro to R Functions

Github Repository: matthewluu2002/R-Programming (github.com)

The purpose of this function is to find the mean value of the dataset. The "myMean" functions essentially runs the standard formula of calculating mean (mean = sum/count) by taking the vector of numbers, adding them up with the sum function, and using the length function to count how many numbers are in the vector, finally dividing them by the count. 

Running this function with the provided dataset returns the number 19.25, and when running the data set through a calculator normally, returns the same number as well. This proves the functionality of the myMean function. 

File uploaded to my Github repository for availability to download and test. 





Comments