#' Add additional columns to a dataframe, as zeros
#'
#' @param data data frame
#' @param columns vector of characters
#' @return Augmented data frame
#' @examples
#' cbind.fill.data.frame(iris, c('one', 'two'))
cbind.fill.data.frame <- function(data, columns) {
for (column in columns)
data[, column] <- 0
data
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.