R/constructMatIA.R

Defines functions `constructMatIA`

`constructMatIA` <-
function(ia.val,ia.num,ia.equal){
	n<-length(ia.val)
	mat<-matrix(NA,ia.num,n)
	geno<-0:2
	for(i in 1:n)
		mat[,i]<-if(ia.equal[i]==1) ia.val[i] 
			else sample(geno[geno!=ia.val[i]],ia.num,TRUE)
	mat
}

Try the scrime package in your browser

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

scrime documentation built on May 2, 2019, 10:24 a.m.