R/envelopes.R

Defines functions envelopes

Documented in envelopes

envelopes <-
function(iterations=100,countdata,dimention){



	## Randobly arrange the counts;



	GSpermprev<-array();

	for (i in 1:iterations){
	
		perm<-matrix(sample(as.vector(countdata),size=2^(dimention*2),replace=FALSE),nrow=2^dimention,byrow=TRUE);
		GSperm<-iterate(perm,dimention);

		
		GSpermprev<-cbind(GSpermprev,GSperm[,3])
	


	}


	ret.val<-cbind(apply(GSpermprev[,-1],1,quantile,probs=c(.05)),apply(GSpermprev[,-1],1,quantile,probs=c(.95)))


}

Try the GriegSmith package in your browser

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

GriegSmith documentation built on May 2, 2019, 12:07 p.m.