I'm trying to plot this graph using R but dont know how.
Screenshot of the dataset that I'm using
You didn't provide the dataset, but you could do something like that
# packages ---------------------------------------------------------------- library(dplyr) library(ggplot2) # data -------------------------------------------------------------------- #load your data first # # #get just the last observation for each location dataset2 <- dataset %>% group_by(location) %>% slice_tail() %>% ungroup() # plot -------------------------------------------------------------------- dataset2 %>% ggplot(aes(x = continent, y = total_deaths))+ geom_bar()
dput?