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

Default packages #421

Open
krlmlr opened this issue Jun 24, 2022 · 0 comments
Open

Default packages #421

krlmlr opened this issue Jun 24, 2022 · 0 comments
Labels
feature a feature request or enhancement

Comments

@krlmlr
Copy link
Member

krlmlr commented Jun 24, 2022

I'd like to make a case for an argument default_packages = getOption("reprex.default_packages") .

  • When loading conflicted, all those nasty deprecation warnings disappear
  • The number one issue for repeating the generation of a reprex is to forget to attach magrittr

Granted, the second issue is losing relevance with |>, but I would totally use options(reprex.default_packages = c("conflicted", "magrittr")) . The inserted library() calls would be inserted in front of the code that is copied from the clipboard.

Would you like to review a PR?

library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

Created on 2022-06-24 by the reprex package (v2.0.1)

library(conflicted)
library(dplyr)

Created on 2022-06-24 by the reprex package (v2.0.1)

@jennybc jennybc added the feature a feature request or enhancement label Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants