R/mdmb_discretize.R

Defines functions mdmb_discretize

## File Name: mdmb_discretize.R
## File Version: 0.02

mdmb_discretize <- function(x, alpha)
{
    K1 <- length(alpha)
    alpha[1] <- -Inf
    alpha[K1] <- Inf
    y <- cut(x, breaks=alpha, labels=FALSE)-1
    return(y)
}

Try the mdmb package in your browser

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

mdmb documentation built on March 7, 2023, 6:58 p.m.