R/mixmodMap_V2M.R

Defines functions mixmodMap_V2M

Documented in mixmodMap_V2M

mixmodMap_V2M <-
function(z, n = length(z), K = max(z))
{
	A = z + cumsum(c(0,rep(K,(n-1))))
	B = numeric(n * K)
	B[A] = 1
	M <- matrix(B, nrow = n, ncol = K, byrow = T)
	M
}

Try the RmixmodCombi package in your browser

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

RmixmodCombi documentation built on May 2, 2019, 1:27 p.m.