How to remove extended values along y axis of a barchart in R?

Viewed 33

I am trying to plot a bar chart with the following data frame.

Time_Frame  Regions Age 
February-March  South America   60
February-March  South America   62
February-March  Asia    60
February-March  Asia    68
February-March  Asia    84
February-March  North America   58
February-March  Europe  83
February-March  Europe  49

Along the y axis, the graph should follow 60, 62, etc. as labels. but it is showing 60000, 40000, etc. as following picture output graph. Bellow is my code:

library(ggplot2)
library(tidyverse)
setwd("G:/Projects/Death_Mutations")
getwd()
d1 <- read.csv(file = "d.csv", sep = ",", header = TRUE)
ggplot(d1, aes(x = fct_inorder(Time_Frame), y = Age, fill = Regions)) + geom_bar(stat = "Identity")

I have checked the column "Age". It's in integer format. Really want to know where the problem is and how to ressolve.

0 Answers
Related