R/find.ice.R

`find.ice` <-
function(aic)
{
	aic.min <- apply(aic, MARGIN = 1, FUN = min)
	aic.ind <- matrix(aic.min, nrow = nrow(aic), ncol = ncol(aic)) == aic
	aic.ind <- aic.ind & 1 == t(apply(aic.ind, MARGIN = 1, cumsum))
	ice <- t(col(aic))[t(aic.ind)] - 1
	ice
}

Try the pear package in your browser

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

pear documentation built on May 29, 2017, 11:40 p.m.