goals <- c(2, 3, 1, 4,2,0,1,4,3,2)
What is the total number of goals scored?
t_goals <-sum(goals)
t_goals
## [1] 22
22 goals.
What is the average number of goals scored per game?
average_goals <- mean(goals)
average_goals
## [1] 2.2
2.2 goals is the average per game.
What is the maximum number number of goals scored in a single game?
max_goals <- max(goals)
max_goals
## [1] 4
4 goals is the max of goals scored in a signle game.
What is the minimum number of goals scored in a single game?
min_goals <- min(goals)
min_goals
## [1] 0
No goals in a single game (min)