I am trying to unmask some functions that {my_package} masks from another {package} when both are loaded.
To do so, I call unlockBinding()
-given that namespace environments of packages with namespaces are locked when loaded, calling unlockBinding()
is needed to modify the bindings in the namespace, i.e., in this case, to unmask my functions and apply the new mask.
However, unlockBinding()
is flagged as potentially unsafe. In fact, when I run devtools::check()
, it returns a note:
Found the following possibly unsafe calls:
unlockBinding(fun_name, env)
1. Is there an accepted alternative to unlockBinding()
that can be used when submitting to CRAN?
2. How can I submit {my_package} to CRAN while using unlockBinding()? Is there a way to explain that this function is necessary to allow users to unmask certain functions that {my_package} masks?
Rossana Tatulli is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.