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)
  1. What is the total number of goals scored?

There are 22 total goals scored over the course of 10 games.

sum(goals)
## [1] 22
  1. What is the average number of goals scored per game?

The average number of goals scored per game is 2.2.

mean(goals)
## [1] 2.2
  1. What is the maximum number number of goals scored in a single game?

The max number of goals scored in one game is 4.

max(goals)
## [1] 4
  1. What is the minimum number of goals scored in a single game?

The min number of goals scored in one game is 0.

min(goals)
## [1] 0