R/categorical.R

Defines functions categorical

Documented in categorical

#' @export
categorical <-
function(x)
{
   f <- outer(x, levels(x), function(w,f) ifelse(w==f,1,0))
   colnames(f) <- paste("", levels(x), 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.