powered by
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
sd
apply(dat,2,sd)
colSds(dat, silent = FALSE, debug = FALSE, callFrom = NULL)
numeric vector of sd values
matrix (or data.frame) with numeric values (may contain NAs which will be ignored)
(logical) suppress messages
(logical) additional messages for debugging
(character) allows easier tracking of messages produced
set.seed(2016); dat1 <- matrix(c(runif(200) +rep(1:10,20)), ncol=10) colSds(dat1)
Run the code above in your browser using DataLab