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)

A. What is the total number of goals scored?

sum(goals)
[1] 22

B. What is the average number of goals scored per game?

mean(goals)
[1] 2.2

C.What is the maximum number number of goals scored in a single game?

max(goals)
[1] 4

D. What is the minimum number of goals scored in a single game?

min(goals)
[1] 0
LS0tCnRpdGxlOiAiRXhhbSAxIC0gUXVlc3Rpb24gMTQiCm91dHB1dDogaHRtbF9ub3RlYm9vawotLS0KCgpHaXZlbiBhIHZlY3RvciBnb2FscyA8LSBjKDIsIDMsIDEsIDQsMiwwLDEsNCwzLDIpIHRoYXQgcmVwcmVzZW50cyB0aGUgbnVtYmVyIG9mIGdvYWxzIHNjb3JlZCBwZXIgZ2FtZSwgYW5zd2VyIHRoZSBmb2xsb3dpbmcgcXVlc3Rpb25zLiAgQWZ0ZXIgY29tcGxldGluZyB0aGlzIGFjdGl2aXR5IHVzaW5nIFJTdHVkaW8gcGxlYXNlIHNoYXJlIHRoZSBsaW5rIG9yIHVwbG9hZCB5b3VyIGZpbGUgdG8gQ2FudmFzLgoKYGBge3J9CmdvYWxzIDwtIGMoMiwzLDEsNCwyLDAsMSw0LDMsMikKYGBgCgoKQS4gV2hhdCBpcyB0aGUgdG90YWwgbnVtYmVyIG9mIGdvYWxzIHNjb3JlZD8KCmBgYHtyfQpzdW0oZ29hbHMpCmBgYAoKQi4gV2hhdCBpcyB0aGUgYXZlcmFnZSBudW1iZXIgb2YgZ29hbHMgc2NvcmVkIHBlciBnYW1lPwoKYGBge3J9Cm1lYW4oZ29hbHMpCmBgYAoKQy5XaGF0IGlzIHRoZSBtYXhpbXVtIG51bWJlciBudW1iZXIgb2YgZ29hbHMgc2NvcmVkIGluIGEgc2luZ2xlIGdhbWU/CmBgYHtyfQptYXgoZ29hbHMpCmBgYAoKRC4gV2hhdCBpcyB0aGUgbWluaW11bSBudW1iZXIgb2YgZ29hbHMgc2NvcmVkIGluIGEgc2luZ2xlIGdhbWU/CmBgYHtyfQptaW4oZ29hbHMpCmBgYAoK