[R] Add function to histogram?
TEMPL Matthias
Matthias.Templ at statistik.gv.at
Wed Sep 21 08:22:52 CEST 2005
Hello,
E.g. with lines() or add a new plot to the current plot with par(new = TRUE) (and set equal xlim and ylins´s in the plot function)
r <- rnorm(100)
hist(r,freq=FALSE)
lines(density(r))
Best,
Matthias
>
> Is there any neat way to add a curve (frequency function or
> the like) to a histogram or other plots? I haven't found one yet...
>
> Robert
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read
> the posting guide! http://www.R-project.org/posting-guide.html
>
More information about the R-help
mailing list