prefer: Defines preferred package::functions

View source: R/prefer.R

preferR Documentation

Defines preferred package::functions

Description

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.

Usage

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

## Not run: 
# prefer `{dplyr}` functions over `{stats}`
prefer("dplyr")

## End(Not run)

kguidonimartins/misc documentation built on Dec. 20, 2024, 7:03 p.m.