my_data <- c(52, 43, 22, 8)

groups <- c("frosh", "soph", "junior", "senior")

barplot(my_data, main = "Math 113 C1", names.arg = groups)

barplot(my_data, main = "Math 113 C1", names.arg = groups, col = c("red","blue","green","yellow"))

rel_freq <- my_data / sum(my_data)

barplot(rel_freq, main = "Math 113 C1", names.arg = groups, col = c("red","blue","green","yellow"))

pie(my_data, labels = groups, main = "Math 113 C1")

1 zebra

2 cat

3 variance

4 data

1

  1. hi

  2. bye

  3. time

2

  1. dog

  2. lake

  3. statistics