my experience 2

For my second advanced statistics assignment, I worked with RStudio, running and analyzing a function called myMean to find the average of a set of numbers.

Here is the data I was given:

assignment2 <- c(6,18,14,22,27,17,19,22,20,22)

myMean <- function(assignment2)  {return(sum(assignment2) / length(assignment2)) }

The result I got in RStudio was 18.7

The assignment2 function contains the set of numbers I was given and stores them together as one set of data, making it easily accessible to use.

Leave a comment