#' Move column to the end of dataframe
#'
#' @param df Dataframe
#' @param ... Columns that should be at the end of the Dataframe.
#'
#' @export
#'
#' @examples
#' to_last(mtcars, cyl)
to_last <- function(df, ...) {
cols <- dplyr::enquos(...)
df %>%
dplyr::select(-c(!!!cols), c(!!!cols))
}
to_last(mtcars, cyl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.