[R] Plotting pdf of function

Dimitris Rizopoulos d.rizopoulos at erasmusmc.nl
Wed Mar 4 10:32:20 CET 2009

have a look at ?curve(), e.g.,

curve((1 + x^2) / pi, -15, 15)

I hope it helps.


Beetle wrote:
> Hi Guys,
> I'm a numbie to R.
> I searched the forum for plotting pdf's of functions but couldn't find one
> that explained my question.
> I have been asked to plot the pdf  fX(x) = 1/pi(1+x^2). -infinity < x <
> infinity.
> I would be greatfull if someone might point me to a webpage that might give
> me a hand.
> Kindest regards
> Beetle

Dimitris Rizopoulos
Assistant Professor
Department of Biostatistics
Erasmus University Medical Center

Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands
Tel: +31/(0)10/7043478
Fax: +31/(0)10/7043014

More information about the R-help mailing list