colSds function

sd for each column

sd for each column

This function is speed optimized sd per column of a matrix or data.frame and treats each column as independent set of data for sd (equiv to apply(dat,2,sd)). NAs are ignored from data. Speed improvements may be seen at more than 100 columns

colSds(dat, silent = FALSE, debug = FALSE, callFrom = NULL)

Arguments

  • dat: matrix (or data.frame) with numeric values (may contain NAs which will be ignored)
  • silent: (logical) suppress messages
  • debug: (logical) additional messages for debugging
  • callFrom: (character) allows easier tracking of messages produced

Returns

numeric vector of sd values

Examples

set.seed(2016); dat1 <- matrix(c(runif(200) +rep(1:10,20)), ncol=10) colSds(dat1)

See Also

sd

  • Maintainer: Wolfgang Raffelsberger
  • License: GPL-3
  • Last published: 2024-08-20

Useful links