Suppress conflict messages when mask.ok

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Suppress conflict messages when mask.ok

Magnus Thor Torfason
I was very happy to see the new mask.ok option. It works very well when
conflicts.policy is "strict":

---
options(conflicts.policy="strict")
library(igraph, exclude="decompose", mask.ok=c("spectrum","union"))
#> [No messages]
---

However, if no conflicts.policy has been set, the masked objects are loudly
reported, even if they are specified with mask.ok:

---
library(igraph, exclude="decompose", mask.ok=c("spectrum","union"))
#>
#> Attaching package: 'igraph'
#> The following object is masked from 'package:stats':
#>
#>     spectrum
#> The following object is masked from 'package:base':
#>
#>     union
---

It seems that if I specify mask.ok, that particular masking is expected and
should NOT be reported, regardless of what the conflicts.policy is. It
would be very useful for many users who are not ready to switch over to a
strict conflicts.policy, to nevertheless be able to suppress messages about
expected conflicts using mask.ok and thus only get messages when unexpected
masking occurs.

Best,
Magnus

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel