On 8/25/2008 3:05 PM, Max Kuhn wrote:
Everyone,

I've got code in my package that uses LogitBoost from the caTools
package. caTools does not have a namespace.

My package also uses loads RWeka, which has a namespace, and also has
a function called LogitBoost.

After loading both packages, how can I be specific about running the
version from caTools (since caTools:::LogitBoost won't work)?

It's not easy.  Best would be to convince caTools to add a NAMESPACE.

But as a workaround:

library(caTools)
caToolsEnv <- as.environment("package:caTools")
LogitBoost <- caToolsEnv$LogitBoost

Note that there is no guarantee that LogitBoost will actually work. Because caTools doesn't have a NAMESPACE, there is a risk of other name clashes causing LogitBoost to behave unpredictably.

Duncan Murdoch

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to