The answer to your first question is
curve(ifelse((x>-1)&(x<1),x^2+1,x+2),from=-10,to=10)
Sorry I cannot understand the next part of your query.
Ross Darnell
On Sun, 2007-09-02 at 00:31 -0700, JHawk3 wrote:
> Hi all,
>
> I'm a relatively new user to the R interface, and am trying to do some ba
Hi all,
I'm a relatively new user to the R interface, and am trying to do some basic
operations. So far I've used the curve() command to plot graphs. This has a
couple of limitations, namely trying to do piecewise graphs. Basically, I'm
looking for how to do "if" and "while" loops for making a gr