R/jack.mean.R

Defines functions rowjack.means coljack.means jack.mean

Documented in coljack.means jack.mean rowjack.means

#[export]
jack.mean <- function(x) {
  n <- length(x)
  sum(x) * (n - 1) / n^2 
}



#[export]
coljack.means <- function(x) {
  n <- dim(x)[1]
  Rfast::colsums(x) * (n - 1) / n^2
}



#[export]
rowjack.means <- function(x) {
  n <- dim(x)[2]
  Rfast::rowsums(x) * (n - 1) / n^2
}

Try the Rfast2 package in your browser

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

Rfast2 documentation built on Aug. 8, 2023, 1:11 a.m.