Re: [R] Integration of functions with a vector argument

2024-06-24 Thread Levine, Michael
-0558 URL: www.stat.purdue.edu/~mlevins From: Bert Gunter Sent: Thursday, June 20, 2024 1:09 PM To: Ivan Krylov Cc: Levine, Michael ; r-help@r-project.org Subject: Re: [R] Integration of functions with a vector argument You don't often get email from bgun

Re: [R] Integration of functions with a vector argument

2024-06-24 Thread Levine, Michael
Phone: +1-765-496-7571 Fax: +1-765-494-0558 URL: www.stat.purdue.edu/~mlevins From: Ivan Krylov Sent: Thursday, June 20, 2024 11:37 AM To: Levine, Michael Cc: r-help@r-project.org Subject: Re: [R] Integration of functions with a vector argument External

Re: [R] Integration of functions with a vector argument

2024-06-20 Thread Bert Gunter
The calculus package might also be relevant (not sure if it was in the Task View): https://cran.r-project.org/web/packages/calculus/index.html -- Bert On Thu, Jun 20, 2024 at 10:01 AM Bert Gunter wrote: > If you haven't already done so, you may wish to have a look here: > > > https://cran.r-pr

Re: [R] Integration of functions with a vector argument

2024-06-20 Thread Bert Gunter
If you haven't already done so, you may wish to have a look here: https://cran.r-project.org/web/views/NumericalMathematics.html#differentiation-and-integration (Or perhaps in other related subtopics in the Numerical Math task view) Cheers, Bert On Thu, Jun 20, 2024 at 8:37 AM Ivan Krylov via R

Re: [R] Integration of functions with a vector argument

2024-06-20 Thread Ivan Krylov via R-help
В Tue, 18 Jun 2024 23:12:03 + "Levine, Michael" пишет: > I have heard of several packages used for numerical integration in R - > cubature that you mentioned, mvQuad, and pracma. My impression is > that you think that Cubature is the best in your opinion. Is that so? Yes, but the preference

Re: [R] Integration of functions with a vector argument

2024-06-19 Thread Levine, Michael
email: mlev...@purdue.edu Phone: +1-765-496-7571 Fax: +1-765-494-0558 URL: www.stat.purdue.edu/~mlevins From: Ivan Krylov Sent: Thursday, June 13, 2024 6:21 AM To: Levine, Michael Cc: r-help@r-project.org Subject: Re: [R] Integration of functions with a v

Re: [R] Integration of functions with a vector argument

2024-06-13 Thread Ivan Krylov via R-help
В Wed, 12 Jun 2024 23:42:18 + "Levine, Michael" пишет: > f.int1 <- function(x,y) {Vectorize (function(y) f(c(x,y),H=H,j=j))} Vectorize returns a callable function(y), so wrapping it in a function(x,y) will not work. Since you'd like to integrate over y, we can perform the same transformation

Re: [R] Integration of functions with a vector argument

2024-06-13 Thread Levine, Michael
purdue.edu/~mlevins From: Ivan Krylov Sent: Wednesday, June 12, 2024 6:41 AM To: Levine, Michael Cc: r-help@r-project.org Subject: Re: [R] Integration of functions with a vector argument [You don't often get email from ikry...@disroot.org. Learn why this is imp

Re: [R] Integration of functions with a vector argument

2024-06-13 Thread Jeff Newmiller via R-help
How do you integrate perpendicular to a plane if you don't have a concept of 3d? In that direction the plane is just a point. Vectors in R do not have any concept of "n by 1"... they are like a string of beads. When you take a column out of a matrix `a` using indexing b <- a[,j] the resulting v

Re: [R] Integration of functions with a vector argument

2024-06-12 Thread Ivan Krylov via R-help
В Tue, 11 Jun 2024 18:44:08 + "Levine, Michael" пишет: > Let us say we have a function > > F <- function(x){ body of the function} > > Where x is, in general, a d by 1 vector with d>1. Now I want to > integrate out some of the coordinates of x, e.g. x[1] or x[2] or both > of them etc. I'm

[R] Integration of functions with a vector argument

2024-06-12 Thread Levine, Michael
Hello all, I have a question concerning integration of a function of a multivariate argument with respect to one or more variables in r. Let us say we have a function F <- function(x){ body of the function} Where x is, in general, a d by 1 vector with d>1. Now I want to integrate out some o