[R] Ploting rpart objects / namespace problems
Luis Torgo
ltorgo at liacc.up.pt
Mon Jun 2 19:13:45 CEST 2003
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:
> get("text.rpart",envir=environment(rpart))
Is there an easiest way of seeing the code of this type of "hidden" functions?
Thanks,
Luis
--
Luis Torgo
FEP/LIACC, University of Porto Phone : (+351) 22 607 88 30
Machine Learning Group Fax : (+351) 22 600 36 54
R. Campo Alegre, 823 email : ltorgo at liacc.up.pt
4150 PORTO - PORTUGAL WWW : http://www.liacc.up.pt/~ltorgo
More information about the R-help
mailing list