R/lincurve.R

lincurve <-function(x,start=1,end=2,a=0.25){

block<-a
lx<-length(x)

si<-floor(block*lx)

y<-x

y[1:si]<-start
y[(lx-si+1):lx]<-end

lpart<-lx-2*si

y[(si+1):(lx-si)]<-start+(1:lpart)*(end-start)/lpart

return(y)

}

Try the LS2Wstat package in your browser

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

LS2Wstat documentation built on May 2, 2019, 5:45 a.m.