Displaying 1 result from an estimated 1 matches for "histkdnc".
2009 Nov 30
5
Histogram and Density on the the same graph
Dear all,
I cannot find a function which would allow drawing hist and density on the
same graph.
x <- seq(1,40,1)
y <- 2*x+1+5*rnorm(length(x))
hist(y,freq = FALSE)
plot(density(y))
thanks a lot for the help
[[alternative HTML version deleted]]