Hi R-users, I would like to use jacobian function from numDeriv package. If I have more than one parameters how do I modify it?
This is the example given in the package: func2 <- function(x) c(sin(x), cos(x)) x <- (0:1)*2*pi jacobian(func2, x) Can I do the following: z <- c(x,y) func2 <- function(z) c(sin(xy), cos(x^2*y)) x <- (0:1)*2*pi y <- (0:1)*2*pi jacobian(func2, z) output: > jacobian(func2, z) Error in func(x, ...) : object "xy" not found Thank you so much for any help given. ______________________________________________ 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.