R/def.exp.R

Defines functions def.exp

Documented in def.exp

def.exp = function(x, lambda = 0, normalize = FALSE){
  if(normalize){
      corr = (exp(mean(log(x))))^(lambda - 1)
  } else {
    corr = 1
  }
  if(lambda == 0){
    xt = exp(x)/corr
  } else {
    xt = (corr*x*lambda + 1)^(1/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.