Displaying 4 results from an estimated 4 matches for "approx1".
Did you mean:
approx
2009 Jun 12
2
External signal in ODE written in C (using deSolve and approx1?)
...gnal$times, signal$import, rule = 2)
## Start values for steady state
y <- xstart <- c(S = 1, P = 1, K = 1)
## Solving
out2 <- as.data.frame(lsoda(xstart, times, lvml, parms))
###############################################
I would like to do the same thing in C, and my guess is that the approx1
function has to be used in some way. So far did not figure out how. If
anyone has managed to do so, or know how to approach this problem, please
let me know.
Best wishes
Glenn
[[alternative HTML version deleted]]
2017 Aug 27
0
R_xlen_t is an integer type
A recent R devel NEWS item: approx(), spline(), splinefun() and approxfun() also work for long vectors.
In current R devel, in function 'approx1' in src/library/stats/src/approx.c and in function 'spline_eval' in src/library/stats/splines.c, in
#ifdef LONG_VECTOR_SUPPORT
there is a comment "R_xlen_t is double". It is incorrect. In Rinternals.h, in
#ifdef LONG_VECTOR_SUPPORT
R_xlen_t is defined as ptrdiff_t , an integer...
2004 Apr 21
2
segfault in approx() (PR#6809)
This is R1.9.0, windows XP
I run across the following:
It is admittedly silly, but it shouldn't segfault:
test <- list(y=1:100, x=rep(NaN, 100))
approx(test, xout=rep(NaN, 10))
Bombs!
Kjetil Halvorsen
2023 Feb 23
1
Compilation Error when DEBUG_approx Toggled on in RISC-V
...printf("R_approxfun(x,y, nxy = %.0f, .., nout = %.0f, method = %d,
...)",
(double)nxy, (double)nout, Meth->kind);
#endif
However, there is no `Meth` defined in this function, causing a compilation
error when `DEBUG_approx` is toggled on. The real `Meth` is actually
defined in the `approx1` function, and the Meth seen here is probably a
historical artifact that was never erased. To fix the error, I suggest
changing `Meth->kind` to `method` in the `R_approxfun` function as follows:
#ifdef DEBUG_approx
REprintf("R_approxfun(x,y, nxy = %.0f, .., nout = %.0f, method = %d,
.....