R/sampling2grid.R

Defines functions sampling2grid

sampling2grid <- function(samp){
	
#Check if there is already a grid	
	if (length(samp@grid)>0){
		
#It is the general case where there is a grid 
#including irregular deterministic case
		return(samp@grid)
	}
	
#Check if this grid is random	
	if (samp@random==FALSE){			
#Regular deterministic grid 
		return(seq(samp@Initial[1],samp@Terminal[1],length=samp@n[1]+1)) #Attention! do not treat multifrequency grid
	}
	
	return(1) #To do: Random grid		
}

Try the yuima package in your browser

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

yuima documentation built on Nov. 14, 2022, 3:02 p.m.