Re: [R] Add function to histogram?

From: Peter Wolf <pwolf_at_wiwi.uni-bielefeld.de>
Date: Wed 21 Sep 2005 - 18:00:55 EST

Robert Lundqvist wrote:
>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@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
>
???

dat<-rnorm(100)
hist(dat,prob=TRUE)
x<-seq(-3.5,3.5,length=100)
y<-dnorm(x)
lines(x,y)

have a look at: http://cran.at.r-project.org/doc/manuals/R-intro.pdf

Peter Wolf



R-help@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 Received on Wed Sep 21 18:07:54 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:20 EST