R/zt.R

Defines functions zt

Documented in zt

zt<-function(x=NULL,ctype=1){
    if(is.null(x)) stop ("time series is missing.")
    if(!is.numeric(x)) stop ("time series is not numeric.")
    if(ctype==1) return((x-mean(x,na.rm=T))/sd(x,na.rm=T))
    if(ctype==2) return(x-mean(x,na.rm=T))
   }

Try the fishmethods package in your browser

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

fishmethods documentation built on April 27, 2023, 9:10 a.m.