R/thresholds.R

Defines functions thresholds

Documented in thresholds

#' @export
thresholds <-
function(x, nknots=50)
{
   min <- min(x)
   max <- max(x)
   k <- seq(min, max, length=nknots+2)[2:nknots+1]
   f <- outer(x, k, function(w,t) ifelse(w>=t,1,0))
   colnames(f) <- paste("",k, sep=":")
   f
}

Try the maxnet package in your browser

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

maxnet documentation built on July 9, 2021, 5:08 p.m.