R/span.R

Defines functions span

Documented in span

#Calculate the span
span <- function(x){
      toRet <- if( sum(is.na(x)) == length(x)){
          NA
      } else {
          diff(range(x,na.rm=TRUE))
      }

         if(toRet==-Inf){
            cat("diff_range = -Inf !")
            browser()
         }
      return(toRet)
   }

Try the wasim package in your browser

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

wasim documentation built on May 1, 2019, 6:50 p.m.