#' Split vector into equal chunks
#'
#' @param vec Vector to be split
#' @param n Integer indicating the number of chunks
#' @return A list where elements are individual chunks of the vec. Note that the size of chunks could vary.
#' @export
split_vector_into_equal_chunks = function(vec,n) {
split(vec, ceiling(seq_along(vec)/(length(vec)/n)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.