Skip to content
Justice Tech School

Bar Charts

barplot draws bars from a vector or table.

Example
counts <- table(c("a", "b", "a", "c", "a"))
barplot(counts, main = "Counts", col = "orange", ylab = "n")

Exercise

Bars.

(counts)

Quiz Test

What does barplot draw?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.