#' Repeat a data.frame
#'
#' @description Copy and append data.frame to itself.
#' @details May be useful to use \code{dplyr::group_by()} and or \code{tidyr::nest()} before
#' calling this function.
#' @param data data.frame.
#' @param times numeric. Number of times to replicate \code{data}.
#'
#' @return data.frame
#' @export
repeat_df <- function(data, times) {
data[rep(seq_len(nrow(data)), times), ]
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.