Given a vector goals <- c(2, 3, 1, 4,2,0,1,4,3,2) that represents the number of goals scored per game, answer the following questions. After completing this activity using RStudio please share the link or upload your file to Canvas.
goals <- c(2, 3, 1, 4,2,0,1,4,3,2)
There are 22 total goals scored over the course of 10 games.
sum(goals)
## [1] 22
The average number of goals scored per game is 2.2.
mean(goals)
## [1] 2.2
The max number of goals scored in one game is 4.
max(goals)
## [1] 4
The min number of goals scored in one game is 0.
min(goals)
## [1] 0