I'm trying to make a histogram using basic R. The histogram is doing a good job representing the data. However, I want to combine the few bars on the right-side(from 300,000+)( here is an image enter image description here) into one bar to represent their values.
hist(TotalIncomeRural$D21, breaks ="sturges", labels = TRUE,
xaxt='n', ylim=c(0,1350), col = "red")
axis(side=1, at=c(seq(0,1500000,100000)))
any help is very much appreciated.
Edit: I'll demonstrate what I want to do with the histogram: suppose I have this data and hist function:
x<-c(1,3,5,6,8,9,10,11,13,15,1,3,8,10,1,6,8,2,0, 2,5,3,8,5,5,1,0,0,0,0,3,6,5,8,10,12,16,18, 9, 8,1,1,1,0,5,5,5,6)
hist(x)
when I run this new histogram I'd like to combine all the values above 10 into one bin to represent them (I'm attaching an image here).