Re: [Rd] name conflicts

2008-08-25 Thread Gabor Grothendieck
Use two colons, not three.

On Mon, Aug 25, 2008 at 3:05 PM, Max Kuhn [EMAIL PROTECTED] 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)?

 Thanks,

 Max

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


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


Re: [Rd] name conflicts

2008-08-25 Thread Duncan Murdoch

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


Re: [Rd] name conflicts

2008-08-25 Thread Henrique Dallazuanna
Try this also:

LogitBoost - get(LogitBoost, envir =
as.environment(package:caTools), mode = function)

On Mon, Aug 25, 2008 at 4:05 PM, Max Kuhn [EMAIL PROTECTED] 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)?

 Thanks,

 Max

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




-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O

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


Re: [Rd] name conflicts

2008-08-25 Thread Duncan Murdoch

On 8/25/2008 3:19 PM, Gabor Grothendieck wrote:

Use two colons, not three.


Right, I forget about that possibility.  Still, my warnings about the 
fragility of using a package without a NAMESPACE apply here too.


Duncan Murdoch



On Mon, Aug 25, 2008 at 3:05 PM, Max Kuhn [EMAIL PROTECTED] 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)?

Thanks,

Max

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



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


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