R/I_colVars.R

Defines functions .colVars

# Variance of columns of a matrix
.colVars <- function(.x){     
  .m <- colMeans(.x)
  .vr <- rowSums( (t(.x) - .m)^2 ) / (nrow(.x) - 1)  
  return(.vr)
}  

Try the qgam package in your browser

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

qgam documentation built on April 11, 2025, 6:16 p.m.