I have this sample data:
cvar <- c(\"2015-11-01\",\"2015-11-02\",\"All\") nvar1 <- c(12,10,5) nvar2 <- c(7,5,6) data <- cbind.data.frame(cvar,nvar1,n
With tibble version 1.2 you can use add_row()
tibble
add_row()
https://blog.rstudio.org/2016/08/29/tibble-1-2-0/
data %>% add_row(cvar = "add", nvar1 = sum(nvar1), nvar2 = sum(nvar2))