On 30/10/2009, at 11:35 AM, Gabor Grothendieck wrote:
Try this: deriv(expression(x^2+y^3, x^5+y^6), c("x","y"))
Did *you* try it Gabor? I did just now and it returns only the gradient of the first component: > deriv(expression(x^2+y^3, x^5+y^6), c("x","y")) expression({ .value <- x^2 + y^3 .grad <- array(0, c(length(.value), 2L), list(NULL, c("x", "y"))) .grad[, "x"] <- 2 * x .grad[, "y"] <- 3 * y^2 attr(.value, "gradient") <- .grad .value }) cheers, Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}} ______________________________________________ R-help@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.