R/xinter1.R

"xinter"<-
  function(x, y, z, increasing = TRUE)
{
    
    if(increasing == FALSE) {
        x <- -1 * x
        x <- x[length(x):1]
        y <- y[length(y):1]
    }
    zz <- .Fortran("f_xinter",
                   as.double(x),
                   as.double(y),
                   length(x),
                   as.double(z),
                   result = double(1),
                   PACKAGE = "bootstrap")
    if(increasing == FALSE) {
        zz$result <- -1 * zz$result
    }
    return(zz$result)
}

Try the bootstrap package in your browser

Any scripts or data that you put into this service are public.

bootstrap documentation built on June 17, 2019, 5:04 p.m.