colSds function

Row and column standard deviations

Row and column standard deviations

The rowSds and colSds respectively computes the standard deviations of each rows and columns of the given matrix.

colSds(x) rowSds(x)

Arguments

  • x: A numeric matrix of size n times m

Returns

colSds returns a numeric vector of length m.

rowSds returns a numeric vector of length n.

Examples

x <- matrix(rnorm(50), 10, 5) GMCM:::colSds(x) apply(x, 2, sd) # slower equivalent code y <- matrix(rnorm(50), 10, 5) GMCM:::rowSds(y)

See Also

rowMeans, colMeans

Author(s)

Anders Ellern Bilgrau anders.ellern.bilgrau@gmail.com

  • Maintainer: Anders Ellern Bilgrau
  • License: GPL (>= 2)
  • Last published: 2019-11-05