I want to build a cumulative histogram in project R, where the percentage is shown along the Y-axis, not the frequency
x <- c(rnorm(100), rnorm(50, mean=2,sd=.5)) h <- hist(x, plot=FALSE, breaks=20) h$counts <- cumsum(h$counts) h$density <- cumsum(h$density) plot(h, freq=TRUE, main="(Cumulative) histogram of x", col="white", border="black") box()
thanks for the help
source share