Possible Duplicate:
Masked functions in R
R: Masked Functions
function naming conflicts
If I have two packages: A and B. Say there is function named funfun
in A and there is function named funfun
in B too. When I load A and B, how do I use the first funfun
?
require(A)
require(B)
If I want to use funfun
in A, how do I write this?
You can explictily refer to a package and function combination like this:
A::funfun
B::funfun
In unusual circumstances, you may have to refer to functions that are not exported in the namespace, in which case you need to use:
A:::funfun
B:::funfun
(But this would be unusual, and since non-exported functions do not form part of the package API, these functions could change without warning in subsequent releases of a package.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With