goals <- c(2, 3, 1, 4,2,0,1,4,3,2)
- What is the total number of goals scored?
total_goals <- sum(goals)
total_goals
[1] 22
The total number of goals scored is 22.
- What is the average number of goals scored per game?
average_goals <- mean(goals)
average_goals
[1] 2.2
The average number of goals scored at a game is
2.20
- What is the maximum number number of goals scored in a single
game?
max_goals <- max(goals)
max_goals
[1] 4
The maximum number of goals scored in a single game is
4
- What is the minimum number of goals scored in a single game?
min_goals <- min(goals)
min_goals
[1] 0
The minimum number of goals scored in a single game is
zero
LS0tCnRpdGxlOiAiRXhhbSAjIDEgfCBCb3NjbyBNb3JhbGVzICIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKYGBge3J9CiMgQ3JlYXRpbmcgdmVjdG9yIHRoYXQgcmVwcmVzZW50cyBudW1iZXIgb2YgZ29hbHMgc2NvcmVkIHBlciBnYW1lIApnb2FscyA8LSBjKDIsIDMsIDEsIDQsIDIsIDAsIDEsIDQsIDMsIDIpCmBgYAoKKiBXaGF0IGlzIHRoZSB0b3RhbCBudW1iZXIgb2YgZ29hbHMgc2NvcmVkPwpgYGB7cn0KdG90YWxfZ29hbHMgPC0gc3VtKGdvYWxzKQoKdG90YWxfZ29hbHMKYGBgCioqVGhlIHRvdGFsIG51bWJlciBvZiBnb2FscyBzY29yZWQgaXMgMjIuKioKCiogV2hhdCBpcyB0aGUgYXZlcmFnZSBudW1iZXIgb2YgZ29hbHMgc2NvcmVkIHBlciBnYW1lPwpgYGB7cn0KYXZlcmFnZV9nb2FscyA8LSBtZWFuKGdvYWxzKQoKYXZlcmFnZV9nb2FscwpgYGAKKipUaGUgYXZlcmFnZSBudW1iZXIgb2YgZ29hbHMgc2NvcmVkIGF0IGEgZ2FtZSBpcyAyLjIwKioKCiogV2hhdCBpcyB0aGUgbWF4aW11bSBudW1iZXIgbnVtYmVyIG9mIGdvYWxzIHNjb3JlZCBpbiBhIHNpbmdsZSBnYW1lPwpgYGB7cn0KbWF4X2dvYWxzIDwtIG1heChnb2FscykKCm1he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