R/centre.log.R

`centre.log` <-
function(mat)
{
  mat[mat<=0] <- NA
  mat <- log(mat)
  mat <- mat[,apply(mat,2,function(x) sum(!is.na(x))>2)]
  apply(mat,2,function(x) (x-min(x, na.rm=TRUE))/diff(range(x,na.rm=TRUE)))
}

Try the FRSstats package in your browser

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

FRSstats documentation built on May 2, 2019, 5:18 p.m.