# curve

5 messages
Open this post in threaded view
|

## curve

 Dear R users, How can I use "curve" with a function of two variables ? Thank you very much, Dwayne         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: curve

 Dwayne Blind gmail.com> writes: > How can I use "curve" with a function of two variables ? see "curve3d" in the emdbook package. ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: curve

 In reply to this post by Dwayne Blind On 14/04/2010 4:59 PM, Dwayne Blind wrote: > Dear R users, > > How can I use "curve" with a function of two variables ? >   See Ben Bolker's reply if you want to plot a surface.  If you want to plot a curve by holding one of the two variables fixed, just set it to a constant value, and use "x" as the other variable, e.g. f <- function(x, y) { x^2 + y^2 } curve(f(x, 2), from= .... ) curve(f(3, x), from= .... ) or wrap the function in a one variable function if you want to follow some complicated path, e.g. curve(function(t) f(t, t^2), from=....) Duncan Murdoch ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.