R/happy_cat.R

Defines functions happy_cat

Documented in happy_cat

happy_cat <- function(x) {
  D <- length(x)
  term1 <- ((sum(x^2) - D)^2)^0.25
  term2 <- (0.5 * sum(x^2) + sum(x)) / D
  return(term1 + term2 + 0.5)
}

Try the EEEA package in your browser

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

EEEA documentation built on June 10, 2025, 9:13 a.m.