# Generated by fusen: do not edit by hand
#' Filter duplicate values
#'
#' Description
#'
#' @param .data A dataframe
#' @param ... Columns on which the dataframe should be unique
#'
#' @return A dataframe
#'
#' @export
#' @examples
#' filter_duplicates(table_source, name)
filter_duplicates <- function(.data, ...) {
tmp_ <- NULL
.data <- tibble::as_tibble(.data)
vars_ <- dplyr::enquos(...)
tibble::as_tibble(.data) %>%
dplyr::mutate(tmp_ = paste0(!!!vars_)) %>%
dplyr::filter(duplicated(tmp_) |duplicated(tmp_, fromLast = TRUE)) %>%
dplyr::select(-tmp_) %>%
dplyr::arrange(!!!vars_)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.