similar to: Dependency errors for package pracma

Displaying 20 results from an estimated 100 matches similar to: "Dependency errors for package pracma"

2013 Feb 15
1
minimizing a numerical integration
Dear all, I am a new user to R and I am using pracma and nloptr libraries to minimize a numerical integration subject to a single constraint . The integrand itself is somehow a complicated function of x and y that is computed through several steps. i formulated the integrand in a separate function called f which is a function of x &y. I want to find the optimal value of x such that the
2012 Dec 31
2
code to convert 3D geographical coordinates to Cartesian?
Is there packaged code to convert geographical coordinates (e.g., longitude, latitude, elevation) to Cartesian coordinates in 3-space? I can see how to do this using 1. a spherical-to-Cartesian conversion like pracma::sph2cart(tpr) http://cran.r-project.org/web/packages/pracma/ 2. a geographical-to-spherical conversion. This seems to involve (in roughly increasing order of difficulty or
2013 Jul 17
2
Using RasterBricks
Dear listers, I am trying to create a RasterLayer of the values of a rasterbrick object. The rasterbrick object has, for example, 100cells library(raster) r <- raster(ncol=10, nrow=10) r[]=1:ncell(r) s <- brick(r,r,r) s <- s * 1:3 Each cell of the rasterfinal will have the AREA UNDER CURVE formed by the values in each cell of the three original rasters. For example: s[4] has the
2012 May 09
2
problem with Gauss Hermite ( x and w )
Hi all, I am using the 'gaussHermite' function from the 'pracma' library ############ CODES ########### library(pracma) cc=gaussHermite(10) cc$x^2 cc$x^5 cc$x^4 ############ CODES ########### as far so good. However, it does NOT work for any NON integer values, say ############ CODES ########### cc$x^(2.5) cc$x^(-2.5) ############ CODES ########### But just think about it
2012 Jan 27
3
Numerical instability in new R Windows development version
I have a question concerning the new Windows toolchain for R >= 2.14.2. When trying out my package 'pracma' on the win-builder development version it will stop with the following error message: > f3 <- function(x, y) sqrt((1 - (x^2 + y^2)) * (x^2 + y^2 <= 1)) > dblquad(f3, -1, 1, -1, 1) # 2.094395124 , i.e. 2/3*pi , err = 2e-8 Warning in sqrt((1 - (x^2 + y^2)) *
2023 Nov 09
1
Dependency errors for package pracma
What really interests me: With all those strict checking procedures, how is it possible that the new 'Matrix' version got accepted on CRAN? I think this happened twice to me before, and it takes a lot of time to check package dependencies that turn out to be not dependent -- more time than checking dependencies that are real.
2023 Aug 13
4
Noisy objective functions
While working on 'random walk' applications, I got interested in optimizing noisy objective functions. As an (artificial) example, the following is the Rosenbrock function, where Gaussian noise of standard deviation `sd = 0.01` is added to the function value. fn <- function(x) (1+rnorm(1, sd=0.01)) * adagio::fnRosenbrock(x) To smooth out the noise, define another
2013 Feb 18
2
error: Error in if (is.na(f0$objective)) { : argument is of length zero
Dear all, I tried running the following syntax but it keeps running for about 4 hours and then i got the following errors: Error in if (is.na(f0$objective)) { : argument is of length zero In addition: Warning message: In is.na(f0$objective) : is.na() applied to non-(list or vector) of type 'NULL' Here is the syntax itself: library('nloptr') library('pracma') #
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
2024 Feb 24
1
Clustering Functions used by Reverse-Dependencies
Dear R Users, Are there any tools to extract the function names called by reverse-dependencies? I would like to group these functions using clustering methods based on the co-occurrence in the reverse-dependencies. Utility: It may be possible to split complex packages into modules with fewer reverse-dependencies. Package pkgdepR may offer some of the functionality; but I did not have time to
2012 Apr 02
2
Error in gamma(delta + (complex(0, 0, 1) * (x - mu))/alpha) : unimplemented complex function
I am trying to obtain the grafic of a pdf . but this error keeps showing . Here is the code MXN.fd = function(x,alpha,beta,mu,delta) { A = (2*cos(beta/2))^(2*delta) B = 2*alpha*pi*gamma(2*delta) C = (beta*(x-mu))/alpha D = abs(gamma(delta + (complex(0,0,1)*(x-mu))/alpha)^2) M = A/B*exp(C)*D M plot(x,M,type="l",lwd=2,col="red") } alpha = 0.02612297 beta = -0.50801886 mu =
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
2011 Nov 22
5
x, y for point of intersection
Hi everyone, ? I am trying to get a point of intersection between a polyline and a straight line ?.. and get the x and y coordinates of this point. For exemplification consider this: ? ? set.seed(123) ? k1 <-rnorm(100, mean=1.77, sd=3.33) ?k1 <- sort(k1) q1 <- rnorm(100, mean=2.37, sd=0.74) q1 <- sort(q1, decreasing = TRUE) plot(k1, q1, xlim <- c((min(k1)-5),
2013 Feb 27
0
A program running for a too long time
Dear all, The attached code is supposed to minimize a numerical integration subject to a non linear constraint. The code runs for 2 days& more without giving an output. Also, when i change the value of "m<-100" to "m<-1" it gives an output in areasonable period but with a message " maximum number of iterations in romberg has been reached". I need to : 1-
2012 Apr 18
0
Numerical integration again
Hi all, Here is an integration function require(pracma) # for 'quadinf' myint=function(j) { quadinf(function(x) (1/(1+exp(-x)))^j*(1-1/(1+exp(-x)))^(k-j)*dnorm(x,mu,casigma),-Inf,Inf) } in any optimization routine. It works fine most of the time but failed with some particular sets of values, say one of the following: k=20 mu=-1.978295 casigma=0.008326927 >
2011 Nov 03
1
Question about Calculation of Cross Product
The function of crossprod in R puzzled me. I would like to calculate the cross product of two vectors. According to my text book, it defines like this: a = (ax, ay, az) b = (bx, by, bz) then, the cross product of a and b is: a X b = (ay*bz-az*by, az*bx-ax*bz, ax*by-ay*bz) It can also write in a determinant format. But the crossprod or tcrossprod function in R appeared not calculate the cross
2012 Jan 07
1
k-means++
Hi everyone - I know that R is capable of clustering using the k-means algorithm, but can R do k-means++ clustering as well? Thanks, -- Dr. Ferebee Tunno Assistant Professor Department of Mathematics and Statistics Arkansas State University P.O. Box 70 State University, AR. 72467 ftunno@astate.edu (870) 329-7710 [[alternative HTML version deleted]]
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]]
2011 Dec 31
4
Base function for flipping matrices
Hi all, Are there base functions that do the equivalent of this? fliptb <- function(x) x[nrow(x):1, ] fliplr <- function(x) x[, nrow(x):1] Obviously not hard to implement (although it needs some more checks), just wondering if it had already been implemented. Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/
2012 Feb 29
3
Does anyone knows a KMeans ++ package for R?
Dear all. I am searching for KMeans ++ for R. I cannot find it. Do you know any package with it? Best regards, Rui