The most common conflict between {tidyverse} users is dplyr::filter() and stats::filter(); among {raster} users, the conflict is with dplyr::select(). prefer() eliminates conflicts between namespaces by forcing the use of all the functions of the chosen package, rather than looking for specific conflicts. Because of that and depending on the number of functions exported by a package, prefer() can be slow.

prefer(pkg_name, quiet = TRUE)

Arguments

pkg_name

a atomic vector with package names

quiet

If warnings should be displayed. Default is TRUE

Acknowledgment

prefer() is shamelessly derived from a piece of code in README.md of the {tidylog}

Examples

if (FALSE) {
# prefer `{dplyr}` functions over `{stats}`
prefer("dplyr")
}