search for: spline_ev

Displaying 14 results from an estimated 14 matches for "spline_ev".

Did you mean: spline_dev
2008 Oct 07
0
splinefun gives incorrect derivs when extrapolating to the (PR#13138)
...spline at u; the xs are the original knots. I.e., the four coefficients returned for a knot correspond to the polynomial to the "right" of that knot. Hence no problem with evaluating derivatives to the right of the largest knot. The routine returned by splinefun, calls the C function spline_eval to evaluate the spline at the desired points. If deriv > 0, then the above representation of the polynomials that make up the splines is differentiated within the R code to obtain the desired derivative of the spline. The problem is that spline_eval does not know which derivative is evaluate...
2008 Oct 06
1
splinefun gives incorrect derivs when extrapolating to the left (PR#13132)
This is a low priority bug that has been around for a while, but I came acr= oss it again while alpha testing 2.8. The resulting function for splinefun gives incorrect deriv values when x is= less than the smallest x-value used to create the function (at least in on= e circumstance), but does the correct thing for x greater than the largest = x-value. Here is an example: > x <- 1:10 >
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 type. In function 'approx1' in src/library/stats/src/approx....
2011 Feb 25
1
Error: address 0x6951c20, cause 'memory not mapped'
Dear R list, I get a strange error in R: *** caught segfault *** address 0x6951c20, cause 'memory not mapped' Traceback: 1: .C("spline_eval", z$method, nu = as.integer(n), x = as.double(xout), y = double(n), z$n, z$x, z$y, z$b, z$c, z$d, PACKAGE = "stats") 2: spline(gam.data$x[, col.data], gam.smooths.all$fit[, m], xout = gam.results.global[m, , "x.values"], ties = mean) 3: eval.with.vis(expr, envir...
2008 Oct 07
0
splinefun gives incorrect derivs when extrapolating to the (PR#13139)
...<- as.integer(deriv) @@ -114,18 +113,25 @@ ## where dx := (u[j]-x[i]); i such that x[i] <= u[j] <= x[i+1}, ## u[j]:= xout[j] (unless sometimes for periodic spl.) ## and d_i := d[i] unless for natural splines at left - .C("spline_eval", - z$method, - as.integer(length(x)), - x=as.double(x), - y=double(length(x)), - z$n, - z$x, - z$y, - z$b, - z$c, - z$d, - PACKAGE="stats")$y + res <- .C("spline_eval", + z$method, + as.integer(length(...
2005 Jul 24
1
Buglet in src/appl/splines.c (PR#8030)
--AZaLVt6Pw+ Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Dear all, I was looking at "splinefun" and the underlying C code and believe that there is a memory access error in the C routine "spline_eval". Specifically, on line 368 and following the following code appears: if(ul < x[i] || x[i+1] < ul) { i = 0; j = *n; do { k = (i+j)/2; if(ul < x[k]) j = k; else i = k; } while(j > i+1); } 'ul' is the point at which the spline is to be ev...
1998 Apr 07
3
R-beta: spline problems(?)
...so please have patience! I am trying to run an S-plus program with a certain line: spline(1:nrow(y), y[,1],n=100); This crashes with: Error: NAs in foreign function call (arg 8) Apparently, this is caused by the last command of spline: u <- seq(xmin, xmax, length.out = n) .C("spline_eval", z$method, length(u), x = u, y = double(n), z$n, z$x, z$y, z$b, z$c, z$d)[c("x", "y")] } Now, I can cause that error with: spline(1:10,1:10) So, there is a whole class of problems for which spline refuses to compute anything - is this the correct behav...
2008 Jun 02
0
Missing "spline_coef" DLL and Rob Hyndmans monotonic interpolator
...olator gradient z <- hyman.filter(z) # filter gradients for co-monotonicity z$y <- z$y+z$x*gulim # undo trick z$b <- z$b+gulim # transformation z <- spl.coef.conv(z) # force other coefficients to consistency u <- seq(xmin, xmax, length.out = n) .C("spline_eval", z$method, nu = length(u), x = u, y = double(n), z$n, z$x, z$y, z$b, z$c, z$d, PACKAGE = "stats")[c("x","y")] } cm.splinefun <- function(x, y = NULL, method = "fmm",gulim=0) # modification of stats package splinefun to produce co-monotoni...
2010 Mar 06
1
Possible to use array of spline functions for storing data?
...ouble(z$n) z[c("y", "b", "c")] <- switch(deriv, list(y = z$b, b = 2 * z$c, c = 3 * z$d), list(y = 2 * z$c, b = 6 * z$d, c = z0), list(y = 6 * z$d, b = z0, c = z0)) z[["d"]] <- z0 } res <- .C("spline_eval", z$method, as.integer(length(x)), x = as.double(x), y = double(length(x)), z$n, z$x, z$y, z$b, z$c, z$d, PACKAGE = "stats")$y if (deriv > 0 && z$method == 2 && any(ind <- x <= z$x[1L])) res[ind] <- ifelse(deriv == 1, z$y[...
2002 Sep 09
1
Monotonic interpolation
Has anyone got a function for smooth monotonic interpolation of a univariate function? I'm after something like the NAG function PCHIM which does monotonic Hermite interpolation. Alternatively, montononic cubic spline interpolation. Please reply directly. Rob Hyndman ___________________________________________________ Rob J Hyndman Associate Professor & Director of Consulting
2007 Jan 30
1
Solaris 10 compilation issue
...RNG.o do_machine names.o libintl_dcigettext ../extra/intl/libintl.a(dcgettext.o) R_max_col registration.o R_ClearerrConsole connections.o pcre_maketables character.o spline_eval registration.o spline_coef registration.o R_Busy main.o R_approx registration.o Rf_dnf arithmetic.o Rf_dnt arithmetic.o Rf_pnf...
2007 Jan 30
1
Difficulty with compiling R-2.4.1 on solaris 10
...RNG.o do_machine names.o libintl_dcigettext ../extra/intl/libintl.a(dcgettext.o) R_max_col registration.o R_ClearerrConsole connections.o pcre_maketables character.o spline_eval registration.o spline_coef registration.o R_Busy main.o R_approx registration.o Rf_dnf arithmetic.o Rf_dnt arithmetic.o Rf_pnf...
2007 Jan 30
0
R Compiling issue
...connections.o Rf_lchoose arithmetic.o R_ChooseFile platform.o lminfl_ registration.o deflateInit2_ connections.o N01_kind RNG.o do_machine names.o libintl_dcigettext ../extra/intl/libintl.a(dcgettext.o) R_max_col registration.o R_ClearerrConsole connections.o pcre_maketables character.o spline_eval registration.o spline_coef registration.o R_Busy main.o R_approx registration.o Rf_dnf arithmetic.o Rf_dnt arithmetic.o Rf_pnf arithmetic.o Rf_pnt arithmetic.o Rf_qnf arithmetic.o Rf_qnt arithmetic.o BZ2_bzRead connections.o Rf_choose arithmetic.o Brent_fmin optimize.o Rf_dbinom arit...
2007 Jan 30
0
Issue with compiling R on solaris 10
...RNG.o do_machine names.o libintl_dcigettext ../extra/intl/libintl.a(dcgettext.o) R_max_col registration.o R_ClearerrConsole connections.o pcre_maketables character.o spline_eval registration.o spline_coef registration.o R_Busy main.o R_approx registration.o Rf_dnf arithmetic.o Rf_dnt arithmetic.o Rf_pnf...