colVars {SimDesign}R Documentation

Form Column Standard Deviation and Variances

Description

Form column standard deviation and variances for numeric arrays (or data frames).

Usage

colVars(x, na.rm = FALSE, unname = FALSE)

colSDs(x, na.rm = FALSE, unname = FALSE)

Arguments

x

an array of two dimensions containing numeric, complex, integer or logical values, or a numeric data frame

na.rm

logical; remove missing values in each respective column?

unname

logical; apply unname to the results to remove any variable names?

Author(s)

Phil Chalmers rphilip.chalmers@gmail.com

See Also

colMeans

Examples


results <- matrix(rnorm(100), ncol=4)
colnames(results) <- paste0('stat', 1:4)

colVars(results)
colSDs(results)

results[1,1] <- NA
colSDs(results)
colSDs(results, na.rm=TRUE)
colSDs(results, na.rm=TRUE, unname=TRUE)


[Package SimDesign version 2.16 Index]