Skip to content

Feature request: ability to prefer all functions in package #51

@rossellhayes

Description

@rossellhayes

Certain packages, like tidylog and wisegroup, are designed to mask multiple functions in another package. If these packages are used with conflicted, the user will have to include numerous calls to conflict_prefer() to avoid errors. An alternative is to provide a function, e.g. conflict_always_prefer(), that allows the user to prefer all functions exported from a package.

One way to implement this would be:

conflict_always_prefer <- function(winner, losers = NULL, quiet = FALSE) {
  invisible(
    lapply(getNamespaceExports(winner), conflict_prefer, winner, losers, quiet)
  )
}

# For example
conflict_always_prefer(winner = "tidylog", losers = c("dplyr", "tidyr"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions