powered by
The rowSds and colSds respectively computes the standard deviations of each rows and columns of the given matrix.
rowSds
colSds
colSds(x)rowSds(x)
rowSds(x)
colSds returns a numeric vector of length m.
m
rowSds returns a numeric vector of length n.
n
A numeric matrix of size n times m
Anders Ellern Bilgrau <anders.ellern.bilgrau@gmail.com>
rowMeans, colMeans
rowMeans
colMeans
x <- matrix(rnorm(50), 10, 5) colSds(x) apply(x, 2, sd) # slower equivalent code y <- matrix(rnorm(50), 10, 5) rowSds(y)
Run the code above in your browser using DataLab