R/as.stepfun.R

Defines functions as.stepfun.picor

#' @importFrom stats as.stepfun
#' @export
stats::as.stepfun


#' @importFrom stats stepfun
#' @export
#' 
as.stepfun.picor <- function(x, ...)
{
  if (length(x$knots) == 0L) {
    stop("cannot convert 'x' to a stepfun object, as least one knot is needed", 
         call. = FALSE)
  }
  stats::stepfun(x$knots, x$values, right = TRUE)
}

Try the statip package in your browser

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

statip documentation built on Nov. 18, 2019, 1:06 a.m.