Skip to content
Prev 237802 / 398500 Next

R optimization and curve()?

On Wed, 13 Oct 2010, jcress410 wrote:
I don't see any question here.

However you must RTFM.

1) The returned value of umax() is a list.  How do you expect curve() to plot a list?

2) curve() requires that the function umax() must be vectorisable wrt its first parameter, 
i.e. you pass it a numeric vector and it returns a numeric vector of the same length.

3) you have to realise that curve() will only graph a 1-dimensional function

HTH,
Ray