diff --git a/R/tally.R b/R/tally.R index 603708a..76a7829 100644 --- a/R/tally.R +++ b/R/tally.R @@ -375,11 +375,18 @@ count <- function(x, ...) { UseMethod("count") } +ns_dplyr <- rlang::ns_env("dplyr") + #' @export count.data.frame <- function( x, ...) { - dplyr::count(x, ...) + + if (exists("count.data.frame", ns_dplyr)) { + get("count.data.frame", ns_dplyr)(x, ...) + } else { + dplyr::count(x, ...) + } } #' @export