Create histogram (not barplot) from categorical variable
问题 I know you usually should use a barplot for categorical variables but in my case somebody split the continuous variable into groups and it would be nice to have a histogram anyway. This is what I want to get (except as a histogram): par(oma=c(2,0,0,0)) #so labels are not cut off barplot(table(hhincome),ylab = "Frequency", main = "Netto houshold income", border="black", col="grey",las=2) (Note: A histogram has no space between bars and a x-axis) Data: hhincome <- structure(c(4L, 4L, 1L, 6L, 8L