Add a column total
Examples
# Example data frame
df <- data.frame(
category = c("A", "B", "C"),
value1 = c(10, 20, 30),
value2 = c(5, 15, 25)
)
add_column_total(df)
#> category value1 value2 total
#> 1 A 10 5 15
#> 2 B 20 15 35
#> 3 C 30 25 55