From: czqiu <zunqiu_at_hotmail.com>

Date: Sun, 9 Dec 2007 13:55:15 -0800 (PST)

Date: Sun, 9 Dec 2007 13:55:15 -0800 (PST)

Hello All,

I am a newcomer to R. Currently, I am trying to write an interactive code in
R to let it read the equation which I write and execute the equation in a
curve function.

For example: I want to plot curve by using: curve (equation, -2,2, n=1000)
what I want is that the R code ask me what equation I want to use (which I
know how to write this code):

then, I type for example 3*x.

then 3*x will be assigned to the 'equation' (I don't know how to do this
step)

then curve function will work to plot.

but I dont' know how I can let the equation to be read in and assigned to
equation.

I know how to do this kind of thing for numerical values but not for logical
equations.

Anyone can help out?

thanks a lot!

czqiu

-- View this message in context: http://www.nabble.com/how-to-let-R-read-different-equations-I-write-and-execute-it--tp14243817p14243817.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.Received on Mon 10 Dec 2007 - 09:37:01 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Mon 10 Dec 2007 - 13:30:18 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*