R/discrandz.R

discrandz <-
function(n,G){
	zmat <- matrix(0, n, G)
	for(i in 1:n){
		zmat[i, sample(1:G, 1)] <- 1
	}
	zmat
}

Try the mmtfa package in your browser

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

mmtfa documentation built on May 2, 2019, 1:45 p.m.