R/two_axes.R

Defines functions two_axes

Documented in two_axes

two_axes <- function(x) {
  d <- length(x)
  d_half <- floor(d / 2)
  return(sum(x[1:d_half]^2 * 10^6) + sum(x[(d_half+1):d]^2))
}

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.