R/contr.snps.R

Defines functions `contr.snps`

`contr.snps` <-
function(n,contrasts=TRUE){
	if(length(n)==2){
		warning("One of the SNPs shows only 2 levels, and is therefore not transformed\n",
			"into two variables coding for a dominant and a recessive effect.",
			call.=FALSE)
		return(contr.treatment(n))
	}
	tmp<-contr.treatment(n,contrasts=TRUE) 
	tmp[3,1]<-1 
	colnames(tmp)<-c("D","R")
	tmp
}

Try the logicFS package in your browser

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

logicFS documentation built on Nov. 8, 2020, 5:23 p.m.