rowSds {wrMisc} | R Documentation |
sd for each row (fast execution)
Description
This function is speed optimized sd
per row of a matrix or data.frame and treats each row as independent set of data for sd (equiv to apply(dat,1,sd)
).
NAs are ignored from data unless entire line NA). Speed improvements may be seen at more than 100 lines.
Note: NaN instances will be transformed to NA
Usage
rowSds(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 |
Value
numeric vector of sd values
See Also
Examples
set.seed(2016); dat1 <- matrix(c(runif(200)+rep(1:10,20)),ncol=10)
rowSds(dat1)
[Package wrMisc version 1.15.4 Index]