[R] debugging non-visible functions

Murad Nayal mn216 at columbia.edu
Wed Oct 13 07:17:48 CEST 2004



Hi,

I would like to step-through a non-visible function. but apparently I
don't know enough about namespaces to get that to work:

> methods(predict) 
 ... deleted lines ... 
[27] predict.rpart*             predict.smooth.spline*    
[31] predict.survreg.penal*    

    Non-visible functions are asterisked


> debug(predict.rpart)
Error: Object "predict.rpart" not found


> getAnywhere("predict.rpart")
A single object matching 'predict.rpart' was found
It was found in the following places
  registered S3 method for predict from namespace rpart
  namespace:rpart
with value

function (object, newdata = list(), type = c("vector", "prob", 
    "class", "matrix"), ...) 
{
... deleted code ...
}
<environment: namespace:rpart>


> debug(predict.rpart,pos="package:rpart")
Error: Object "predict.rpart" not found


how can I 'debug' non-visible functions, like predict.rpart?

many thanks
Murad Nayal




More information about the R-help mailing list