sd_rs: Calculate standard deviation for each location under each...

View source: R/sds.R

sd_rsR Documentation

Calculate standard deviation for each location under each regime.

Description

Calculate standard deviation for each location under each regime.

Usage

sd_rs(x, label)

Arguments

x

A data.frame or matrix.

label

A vector of regime labels. Its length must be the same as the number rows in x.

Value

A list of standard deviations for each regime.

Examples

set.seed(123)
x <- matrix(rnorm(200), nrow = 100)
label <- sample(1:2, 100, replace = TRUE)
sd_rs(x, label = factor(label))

mcgf documentation built on June 29, 2024, 9:09 a.m.