Re: [R] multiple density function

From: David Barron <mothsailor_at_googlemail.com>
Date: Tue 19 Sep 2006 - 15:03:00 GMT

Would this do what you want:

> m=seq(10,1,length=10)
> v=seq(3,1,length=10)
> x <- seq(-5,20,length=500)
> plot(x,dnorm(x,m[1],v[1]))
> for (i in 1:10) plot(x,dnorm(x,m[i],v[i]),type="l",col=i)

On 19/09/06, Anupam Tyagi <AnupTyagi@yahoo.com> wrote:
> march <marcella.marinelli <at> uniroma1.it> writes:
>
> >
> >
> > Hi everybody
> > I'm new in R so the question will be easy for you
> > I'm running multiple density functions taking account of the following
> > conditions:
> > mean=seq(10,1,length=10)
> > var=seq(3,1,length=10)
> >
> > How can I describe the density functions on the same chart?
> > thanks
> > Marcella
>
> Hi Marcella, I am not sure of what you are specifically trying to do, but if you
> want more than one set of points on the same graph (chart) use "points" after
> "plot". See examples in the graphics part of R documentation.
> e.g.
>
> > plot(...)
> > points(...)
>
> Anupam.
>
> ______________________________________________
> 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
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
=================================
David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.
Received on Wed Sep 20 01:06:48 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 19 Sep 2006 - 16:30:58 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.