Skip to content

Ploting rpart objects / namespace problems

2 messages · Brian Ripley, Luis Torgo

#
On Mon, 2 Jun 2003, Luis Torgo wrote:

            
getFromNamespace("rpartco", "rpart")
See ?getS3method

These functions (and others) are mentioned in the NEWS file.
#
I've written a small adaptation of the text.rpart function of the rpart 
package to better suite my tree presentation needs (I basically left the code 
untouched, only changing some numbers relating to label positioning).

When I changed to version 1.7.0 this function stopped working printing the 
error :
    couldn't find function "rpartco"

As far as I understand this has to do with the new namespaces conventions and 
the package rpart not exporting "rpartco". Is there an obvious way of 
adapting my function so that I can call the function "rpartco" even if it is 
not exported from the package? If not, is there any way of going arround this 
without having to give up my self-tuned text.rpart ?

A second related question is the following: when I faced the problem mentioned 
above the first thing I done was trying to print the fucntion "text.rpart" to 
check whether something changed dramatically. I was unable to do that because 
of the same exporting reasons I guess. The only way I manage to see the code 
of "text.rpart" was through:
Is there an easiest way of seeing the code of this type of "hidden" functions?

Thanks,
Luis