Hi all, I was wondering whether it is possible to plot math functions, for example sin, cos or a Gaussian type function, in R, and if so, how to do it. I have been searching through the archives and the R manual but had no luck in finding any hints on how to go about this. Any help is much appreciated! Thanks, Jonck
Jonck van der Kogel wrote:> Hi all, > I was wondering whether it is possible to plot math functions, for > example sin, cos or a Gaussian type function, in R, and if so, how to do > it. I have been searching through the archives and the R manual but had > no luck in finding any hints on how to go about this. > Any help is much appreciated! > Thanks, Jonck > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-helpSee ?curve Uwe Ligges
< I was wondering whether it is possible to plot math functions, for example
sin ...>
also maybe:
?plot
<snipped from the help page>
Examples:
...
plot(sin, -pi, 2*pi)
<unsnip>
bob
-----Original Message-----
From: Uwe Ligges [mailto:ligges@statistik.uni-dortmund.de]
Sent: Thursday, July 24, 2003 11:04 AM
To: Jonck van der Kogel
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Plotting math functions
Jonck van der Kogel wrote:> Hi all,
> I was wondering whether it is possible to plot math functions, for
> example sin, cos or a Gaussian type function, in R, and if so, how to do
> it. I have been searching through the archives and the R manual but had
> no luck in finding any hints on how to go about this.
> Any help is much appreciated!
> Thanks, Jonck
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
See ?curve
Uwe Ligges
______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[[alternative HTML version deleted]]
On Thu, 24 Jul 2003 16:55:55 +0200, Jonck van der Kogel <jonck at vanderkogel.net> wrote :>Hi all, >I was wondering whether it is possible to plot math functions, for >example sin, cos or a Gaussian type function, in R, and if so, how to >do it. I have been searching through the archives and the R manual but >had no luck in finding any hints on how to go about this. >Any help is much appreciated!You can use plot(sin, from=-10, to=10) This calls plot.function; look at ?plot.function to read about the options. Duncan Murdoch