Module #2 Assignment

Daniel Tafmizi

Lis 4273

Dr. Friedman

January 20, 2024

Module 2 Assignment

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

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

myMean(assignment2)

[1] 18.66667

This function found the mean average of the assignment 2 vector. This function 
consists of the name (myMean), the body (data from assignment 2), and the set of 
arguments(sum/length). It returns the sum of the values in assignment 2, and then 
divides it by the length (number of values) in assignment 2. 

Comments

Popular posts from this blog

Module 7 Assignment

Module 4 Assignment

Module 12 Assignment