My intro to R programming

 Hey everyone! I just tested a function for calculating the mean using R studio, and I'm excited to share the results with you! Please refer to my  GitHub repository for my work.

After applying the function to my dataset (assignment), the mean value is 19.25.

 I followed the instructions given by my professor Dr. Friedman and referred the book "The Art of R Programming" by Norman Matloff.

Explanation:

This function works by summing up all the values in the given dataset (sum(assignment)) and then dividing the sum by the total number of elements in the dataset (length(assignment)), it calculates the average value of the dataset.

The formula for mean is:

Mean = Sum of Values / No. of Values

In this case, the function successfully computes the mean of the 'assignment' dataset.


Feel free to try it out with your own datasets or explore Matloff's book!

                                       

Comments

Popular posts from this blog

Mastering Debugging: A Step-by-Step Guide to Fixing Code Errors

A Visual Analysis of Patient Data : Blood Pressure and Medical Assessments