Description Usage Arguments Value Examples
View source: R/calculate_average.R
Return an array of average of specific columns matching a pattern
1 |
df |
A data frame |
pattern |
A string pattern to match |
A vector of average of specific columns matching a pattern
1 2 3 4 5 6 7 | df <- data.frame(
week_payment1 = c(1, 2, 3),
week_payment2 = c(4, 5, 6),
week_payment3 = c(7, 8, 9),
other_column = c(10, 11, 12)
)
calculate_average(df, "week_payment")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.