Description Usage Arguments Examples
add a row of NA to a data frame. This is a wrapper around the summary_row
function.
1 |
df |
the data frame |
1 2 3 4 5 6 7 8 9 10 11 12 | df <- data.frame("year" = 2014:2016,
"a" = c(NA, 1, 3),
"b" = c("g", "e", "f")
)
averages_row(df = df, cols = 2)
averages_row(df = df, cols = 2, label_col = 1, label = "Totals")
df$d <- 5:7
# add new row
averages_row(df = df, cols = c(2, 4), label_col = 1, label = "Totals")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.