-
Notifications
You must be signed in to change notification settings - Fork 0
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
conflicted doesn't like inops #40
Comments
Yes, it's related to I tried loading the version with that function removed and had no issues. One possibility is to simply remove the support for standard binary operators. The replacement for all of them can be achieved with
But also maybe it's something that |
They're some of my favourite things about the package. Basically I use But conflcted alone is not a good enough reason, there would need to be a more fundamental implication. |
I'm pretty sure it's a conflicted problem and our package is fine. conflicted checks if conflicted functions are "superset" of base functions by checking their arguments, and it chokes on
|
Yup, it gives the same error for my "annmatrix" package, which overwrites |
Regarding keeping it in / removing it: I am just worried that a lot of potential users will bail after seeing that it over-writes Other than that - I have nothing against it! |
Maybe we should add a message with |
tidyverse actually does it so it's possible, but I think it's because it doesn't have conflicts itself but attaches other packages. I think a trick would be to define the function in Could still be documented as is, just replacing the definition by NULL and adding an explicit roxygen name. Ironically this way it shouldn't be accessible by |
I'm one of those potential users. 😉 I think CRAN repository policy is also relevant in this context:
I know, |
Hi Sebastian, thanks for sharing your concern. I can assure you that we will never try to dissimulate the information that The CRAN text that you quote refers to changes that would impact all base functions or packages wrapping the functionality, these are to be avoided at all costs. Our overloading of this operator won't affect how It should also not change the way it works at all, because its definition is only altered to deal with the case where 3 arguments are provided, to be able to do Here is the code in case you haven't seen it :
All that being said I realize this is surprising, and still reflecting on what's the best way to deal with this, but I fine the operator useful and would like to keep it. Maybe this should be its own issue, that we'd pin, as other users might come looking for it. |
@KKPMW I added a pinned issue, if we need to discuss related technical issues let's do them here our in a separate issue and leave the pinned issue to address user comments if you don't mind. |
@moodymudskipper good idea with the pinned issue. We might also add it in the notes section of the readme. I also agree with @bastistician that we should not hide or downplay the fact that the package overloads |
The following would be feasible in theory, but cause other issues, so I think we just have to live with the message : I -
In practice to unlock the environment it seems the only ways to do this are by using C/C++ with either package inline or Rcpp, and adding a dependency just to hack a message is overkill of course. II -
This would work smoothly I think, and other packages attach things to environments, like Note that or conflicted for that matter avoids the warning messages by overriding I don't think our issue deserves making the search path weirder, but it's interesting that Hadley and CRAN think it's ok to override without message as long as it's not in "package:mypkg" and that general behavior is kept (I had problems with the III -
Mentioned for completeness, but very bad practice, probably forbidden by CRAN anyway |
Thanks for the clarifications. I agree that inops should not hack around the default message about masking library("inops", warn.conflicts = FALSE) in their scripts. |
I just noticed today that tidyverse packages don't warn anymore that library(magrittr)
library(purrr)
#>
#> Attaching package: 'purrr'
#> The following object is masked from 'package:magrittr':
#>
#> set_names Created on 2019-12-09 by the reprex package (v0.3.0) |
@KKPMW FYI : r-lib/conflicted#48
The text was updated successfully, but these errors were encountered: