Skip to content
Prev 262057 / 398502 Next

Question about curve function

On Jun 6, 2011, at 11:22 , Prof Brian Ripley wrote:

            
Ouch. This springs to mind:
If the answer is parse() you should usually rethink the question.
   -- Thomas Lumley
      R-help (February 2005)


but curve() predates that insight by half a decade or more. It could probably do with a redesign, if anyone is up to it.

By the way, it really does work if the 2nd arg is an expression object (as opposed to an expression evaluating to an expression object):

do.call(curve,list(expression(x)))

or

cl <- quote(curve(x))
cl[[2]] <- expression(x)
eval(cl)

(The trouble with nonstandard evaluation is that it doesn't follow standard evaluation rules...)