"Michael Conklin" <[EMAIL PROTECTED]> writes: > I am trying to write a modified function to plot an rpart object. By > using getS3method I can see the plot and text code that I want to > modify. Since I don't want to modify the package, I create a new > function to plot the rpart object. The problem is that the original > function calls many rpart specific functions that are only visible > inside the rpart namespace. Therefore, when I call my modified function > it does not find the rpart specific functions and gives me an error. > How can I make a new function that is a small modification of an > existing package function and let the modified function access the > hidden package functions?
You can subvert namespace protection using ":::". So if there is a hidden function g in package foo, use foo:::g(). ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html