Learn R Programming

GriegSmith (version 1.0)

envelopes: envelopes

Description

Used by GriegSmith function

Usage

envelopes(iterations = 100, countdata, dimention)

Arguments

iterations
countdata
dimention

Value

    Examples

    Run this code
    ## The function is currently defined as
    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)))
    
    
      }

    Run the code above in your browser using DataLab