I was trying to create a barplot using ggplot but couldn't get the right result. This is my data set:
I'm trying to create a barplot like this:
CodePudding user response:
You would do (assuming your dataframe is called d
):
library(tidyverse)
d %>%
ggplot(aes(x = continent, y = continental_sum))
geom_bar(stat = "identity", fill = "blue")
labs(
title = "Total Death Per Continent",
y = "Total Death Count",
x = ""
)