From: Gregory Gentlemen <gregory_gentlemen_at_yahoo.ca>

Date: Fri 29 Jul 2005 - 06:36:50 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 29 06:39:46 2005

Date: Fri 29 Jul 2005 - 06:36:50 EST

Thanks for the prompt reply.

Your right, that was a weak example.

Consider this one though:

f <- function(n,x) (x-2.5)^2*n

g <- function(y) optimize(f,c(0,15), maximum=TRUE,x=y)$maximum*y

invalid function value in 'optimize'

f <- function(x,y) x^3 + yx + 1

g <- function(y) optimize(f,c(0,5),maximum=TRUE,y)$maximum

For instance consider this simple example for which I cannot get R to return the desired result:

[[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

http://www.R-project.org/posting-guide.html

[[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 29 06:39:46 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:34:07 EST
*