Displaying 20 results from an estimated 5000 matches similar to: "numerical integration of a ftn of 2 variables"
2007 Oct 23
2
2-D numerical integration over odd region
Hello all,
I'm hoping to find a way to evaluate the following sort of integral in R.
\int_a^b \int_{g(y)}^Inf f(x,y) dx dy.
The integral has no closed form and so must be evaluated numerically. The "adapt" package provides
for multidimensional integration but does not appear to allow the limits of integration to be a
function. I need to evaluate a number of integrals of this
2013 Feb 16
3
two dimensional integration
Dear R-users,
I'm wondering how to calculate this double integral in R:
int_a^b int_c^y g(x, y) dx dy
where g(x,y) = exp(- alpha (y - x)) * b
Thanks for answering!
Cheers,
Alui
[[alternative HTML version deleted]]
2004 Oct 21
2
How to calculate a double integral ...?
Dear R-Friends,
How can I calculate a double integral like
\int_a^b \int_c^y g(x, y) dx dy
where a, b, c are constants, g(x, y), e.g.,
g(x, y) = tan(x + y).
I tried to nested integrate() and adapt(),
but none of them working, seemingly due to the
limits can not be specified constants.
Best regards,
C. Joseph Lu
Department of Statistics
National Cheng-Kung University
Voice:
2011 Nov 10
2
performance of adaptIntegrate vs. integrate
Dear list,
[cross-posting from Stack Overflow where this question has remained
unanswered for two weeks]
I'd like to perform a numerical integration in one dimension,
I = int_a^b f(x) dx
where the integrand f: x in IR -> f(x) in IR^p is vector-valued.
integrate() only allows scalar integrands, thus I would need to call
it many (p=200 typically) times, which sounds suboptimal. The
2008 Dec 09
1
errors with compilation
Hi,
i'm trying to compile R on a Cray XT3 using pgi/7.2.1 - CNL (compute
node linux)
The R version is 2.8.0
this is the option
-enable-R-static-lib=yes
--disable-R-shlib
CPICFLAGS=fpic
FPICFLAGS=fpic
CXXPICFLAGS=fpic
SHLIB_LDFLAGS=shared
--with-x=no
SHLIB_CXXLDFLAGS=shared
--disable-BLAS-shlib
CFLAGS="-g -O2 -Kieee"
FFLAGS="-g -O2 -Kieee"
CXXFLAGS="-g -O2
2003 Jul 11
1
metapost device in R (again ;-)
Hi,
I read the 2000 thread on a MetaPost device in R. If I understand
correctly, the main problem with the concept is that R wants the device
driver to give back information on the size of strings/labels.
To the bet of my knowledge, MetaPost _does_ make it possible to
measure the bounding box of text (see section 7.3: Measuring text in
the MetaPost manual). For example, one could get the size of
2006 Oct 10
4
generate random numbers that sum up to 1
As I have previously asked, in response to a similar
question: Is this a homework problem?
cheers,
Rolf Turner
rolf at math.unb.ca
2004 Sep 17
2
help with numerical solution for two simultaneous nonlinear equations in 2 variables
Hi,
I am relatively new to R and am trying to solve two simultaneous
nonlinear equations in two variables numerically, and was wondering if
anyone knew if any of the packages could do that. An alternative is
writing my own code using Newton-Raphson; I did that but was not able to
get good convergence. Any ideas please?
Thanks
Yogesh
[[alternative HTML version deleted]]
2004 Sep 27
1
Numerical two-dimensional integration
Dear all,
I need to compute (numerically) the two-dimensional integral: int(int f(x,y)dy)dx.
What is the more efficient(fast) way to do it?
Is adapt function appropriate for this problem?
I will much appreciate your help and attention.
Vicky.
[[alternative HTML version deleted]]
2011 Dec 18
1
Product integral in R
Hi,
I am wondering if anybody ever come across any implementation of
product integral in R? As far as I googled, I haven't come across any
package. Is there any? Thank you.
http://en.wikipedia.org/wiki/Product_integral
Regards,
Robert
2020 Apr 30
3
Use of MathJax (or something similar) in .Rd files
Hello All,
I am wondering if there has ever been any discussion/consideration given to incorporating MathJax (or something similar) into R for rendering equations in .Rd files. I know that equations are rendered beautifully in the pdf manuals, but I suspect the majority of users primarily look at the html help files when using R. While I am comfortable reading something like "B_x(a,b) =
2011 Jul 07
6
Xen unstable on NetBSD
Hello,
I''m trying to compile Xen unstable on NetBSD, I''ve aplied the patches
from http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/xentools41/patches/?only_with_tag=MAIN
and copied the blk files from
http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/xentools41/files/?only_with_tag=MAIN
(I don''t know which of these patches have been applied to xen
unstable, so
2004 Nov 25
4
Avoiding for-loops
Hello R-users,
I have a symmetric matrix of numerical values and I
want to obtain those values in the upper or lower
triangle of the matrix in a vector. I tried to do the
job by using two for-loops but it doens't seem to be a
clever way, and I'd like to know a more efficient code
for a large matrix of thousands of rows and columns.
Below is my code for your reference.
Thanks a lot.
2004 Nov 13
3
density estimation: compute sum(value * probability) for given distribution
Dear R users,
This is a KDE beginner's question.
I have this distribution:
> length(cap)
[1] 200
> summary(cap)
Min. 1st Qu. Median Mean 3rd Qu. Max.
459.9 802.3 991.6 1066.0 1242.0 2382.0
I need to compute the sum of the values times their probability of
occurence.
The graph is fine,
den <- density(cap, from=min(cap),
to=max(cap), give.Rkern=F)
2003 Jun 07
1
table( , exclude=NULL) for factor objects
The NEWS file for R-1.7.0 says:
table() now allows exclude= with factor arguments (requested by
Michael Friendly).
But in a recent R-1.7.1beta:
> test <- c(1,2,3,4,5,1,2,3,4,5,NA,NA,1,2,3,4,5)
> table(test)
test
1 2 3 4 5
3 3 3 3 3
> table(test, exclude=NULL)
test
1 2 3 4 5 <NA>
3 3 3 3 3 2
> table( as.factor(test), exclude=NULL)
1 2
2020 Apr 30
2
Use of MathJax (or something similar) in .Rd files
Interesting. I gave this a try, but couldn't make this work. One would have to infuse something like
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax at 3/es5/tex-mml-chtml.js">
</script>
or
<script id="MathJax-script" async
src="<url-to-your-site>/mathjax/tex-chtml.js">
</script>
into
2004 Nov 29
2
[BASIC] Solution of creating a sequence of object names
Dear R-users,
I state that this is for beginners, so you may ignore
this in order not to be irritated.
By the way, "patience" is another important thing,
together with "kindness", we should keep in mind when
we teach students and our own children as Jim Lemon
pointed out well in the context of the Socratic
method. You may know that being kind does not mean
giving
2012 Mar 23
3
R numerical integration
Hi all,
Is there any other packages to do numerical integration other than the
default 'integrate'?
Basically, I am integrating:
integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value
The integration is ok provided sigma is >0.
However, when mu=-1.645074 and sigma=17535.26
It stopped working. On the other hand, Maple gives me a value of
0.5005299403.
It is an
2010 Apr 14
2
Gaussian Quadrature Numerical Integration In R
Hi All,
I am trying to use A Gaussian quadrature over the interval (-infty,infty) with weighting function W(x)=exp(-(x-mu)^2/sigma) to estimate an integral.
Is there a way to do it in R? Is there a function already implemented which uses such weighting function.
I have been searching in the statmode package and I found the function "gauss.quad(100, kind="hermite")" which uses
2020 Apr 30
2
Use of MathJax (or something similar) in .Rd files
Thanks Gabor and Duncan! It works. For those interested, I added this to the beginning of the \details{} section:
\if{html}{\out{
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax at 3/es5/tex-mml-chtml.js">
</script>
}}
And then I can use:
\if{html}{\out{\(B_{x(a,b)} = \int_0^x t^{a-1} (1-t)^{b-1} dt\)}}
or