[R] New mask.ok option for libraries

Magnus Torfason zu|ut|me@net @end|ng |rom gm@||@com
Thu Jan 7 16:02:19 CET 2021

I had sent the following to r-devel a while ago, but perhaps r-help is more
appropriate. I guess my question is what to do with this, would people
generally file an issue, or is there a way to hear if this is something
that makes sense to add – whether more info would be helpful and so on?

I was very happy to see the new mask.ok option. It works very well when
conflicts.policy is "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.


	[[alternative HTML version deleted]]

More information about the R-help mailing list