#' Split vector into chunks
#'
#' NOTE: The output chunks may not be of equal size, as any reminder of elements will be part of last chunk.
#'
#' @param vec Vector of any type.
#' @param n Integer of desired count of chunks.
#' @return List of vector-split chunks.
#' @export
split_vector_into_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.