R/def.log.R

Defines functions def.log

Documented in def.log

def.log = function(x, lambda = 0, normalize = FALSE){
  if(normalize){
      corr = (exp(mean(log(x))))^(lambda - 1)
  } else {
    corr = 1
  }
  if(lambda == 0)
    xt = log(x)/corr
  else
    xt = (x^lambda - 1)/(corr*lambda)
  return(xt)
}

Try the desk package in your browser

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

desk documentation built on May 29, 2024, 6:05 a.m.