> -----Original Message----- > From: Petr Pikal [mailto:[EMAIL PROTECTED] > Sent: 03 September 2003 13:57 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [R] plotting a distribution curves > > > Hallo > > On 1 Sep 2003 at 16:25, Rajarshi Guha wrote: > > > Hi, > > is there a way to plot distribution curves (say normal or chi sq > > etc) > > from within R? > > > > For example I looked up the *chisq family of functions but I'm not > > sure as to how I would use them to generate a plot of the chi sq > > distribution (for arbitrary d.o.f). > > Something like that > > plot(seq(-3,3,.1),dnorm(seq(-3,3,.1)),type="l") > plot(seq(0,20,.1),dchisq(seq(0,20,.1),5),type="l")
Or using curve (see ?curve) curve(dnorm(x,1,2),-4,6) curve(dchisq(x,5),0,20) HTH Thomas > > > > > > Thanks, > > > > ------------------------------------------------------------------- > > Rajarshi Guha <[EMAIL PROTECTED]> <http://jijo.cjb.net> GPG > > Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE > > ------------------------------------------------------------------- > > Did you hear that two rabbits escaped from the zoo and so far they > > have only recaptured 116 of them? > > > > ______________________________________________ > > [EMAIL PROTECTED] mailing list > > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > > Cheers > Petr Pikal > [EMAIL PROTECTED] > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > --- Thomas Hotz Research Associate in Medical Statistics University of Leicester United Kingdom Department of Epidemiology and Public Health 22-28 Princess Road West Leicester LE1 6TP Tel +44 116 252-5410 Fax +44 116 252-5423 Division of Medicine for the Elderly Department of Medicine The Glenfield Hospital Leicester LE3 9QP Tel +44 116 256-3643 Fax +44 116 232-2976 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help