R/cipolygon.R

Defines functions cipolygon

Documented in cipolygon cipolygon

# cipolygon.R
# function to draw CI polygon

cipolygon<-function(time,lower,upper){
 n<-length(time)
 points<-matrix(nrow=n*2,ncol=2)
 points[1:n,1:2]<-cbind(time,upper)
 points[(n+1):(2*n),1:2]<-cbind(time[n:1],lower[n:1])
 polygon(x=points[,1],y=points[,2],col='gray',border=NA)
}

Try the season package in your browser

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

season documentation built on May 2, 2019, 5:22 p.m.