calculate_standard_deviation: Return a vector of standard deviation of specific columns...

Description Usage Arguments Value Examples

View source: R/calculate_standard_deviation.R

Description

Return a vector of standard deviation of specific columns matching a pattern

Usage

1

Arguments

df

A data frame

pattern

A string pattern to match

Value

A vector of standard deviation of specific columns matching a pattern

Examples

1
2
3
4
5
6
7
8
df <- data.frame(
week_payment1 = c(0, 3, 6),
week_payment2 = c(2, 5, 8),
week_payment3 = c(5, 8, 11),
other_column = c(10, 11, 12)
)
calculate_standard_deviation(df, "week_payment")
c(6, 6, 6)

UBC-MDS/featurescreator documentation built on Feb. 5, 2022, 8:12 a.m.