R/ComplPos.R

Defines functions ComplPos

Documented in ComplPos

ComplPos <-
function(pos, T, type='Pos')
{
	if (max(pos)>T) stop('All the positions in pos must be lower  or equal than T')
	Npos<-rep(0,T)
	if (type=='Pos') Npos[pos]<-pos
	if (type=='Bin') Npos[pos]<-1
	return(Npos)
}

Try the IndTestPP package in your browser

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

IndTestPP documentation built on Aug. 29, 2020, 1:06 a.m.