Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respecting exclude and include.only #84

Closed
cgoo4 opened this issue Jan 22, 2023 · 1 comment · Fixed by #85
Closed

Respecting exclude and include.only #84

cgoo4 opened this issue Jan 22, 2023 · 1 comment · Fixed by #85

Comments

@cgoo4
Copy link

cgoo4 commented Jan 22, 2023

This is a very helpful package I wish I'd discovered earlier!

Whilst a user of conflict_scout() is more likely to pair this with conflict_prefer*, could it respect the exclude and include.only arguments in library()?

library(dplyr)
library(xts, exclude = "first")

funs <- ls("package:xts")
funs[funs %in% c("first", "last")]
#> [1] "last"

conflicted::conflict_scout()
#> 4 conflicts:
#> * `filter`: dplyr, stats
#> * `first` : xts, dplyr
#> * `lag`   : dplyr, stats
#> * `last`  : xts, dplyr

Created on 2023-01-22 with reprex v2.0.2

@hadley
Copy link
Member

hadley commented Jan 30, 2023

Incoming:

library(dplyr, warn.conflicts = FALSE)
library(xts, exclude = c("first", "last"))
#> Loading required package: zoo
#> 
#> Attaching package: 'zoo'
#> The following objects are masked from 'package:base':
#> 
#>     as.Date, as.Date.numeric

conflicted::conflict_scout()
#> 2 conflicts
#> • `filter()`: dplyr and stats
#> • `lag()`: dplyr and stats

Created on 2023-01-30 with reprex v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants