View source: R/add_total_column.R
add_total_column | R Documentation |
Sum up all numeric columns in a data frame
add_total_column(.data, name = "Total")
.data |
A tbl. |
name |
The output column name. If omitted, it will be Total. |
An object of the same class as .data
df <- data.frame(id = LETTERS[1:3], x1 = 1:3, x2 = 4:6, x3 = 7:9)
df
df %>% add_total_column()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.