How to debug unused functions from necessary packages?

The function in the package that I use gives me not so informative errors. I do not know what's going on. This function is called the internal function of the function I am calling. Something like that:

myres <- the.func(x)

the.func <-function(x){
    unexported.func(x)
}

How to debug unexported.func? Usage debugdoes not work:

>debug(unexported.func)
Error in debug(undexported.func) : object 'unexported.func' not found

Update: I am currently nested in debugging, as shown below. But this is inconvenient for me:

>debug(the.func) # Initiate debugging for the outer function, so I get unexported.func loaded.
>myres <- the.func(x)
Browse[2]>debug(unexported.func) # Now I can call debug with this. 
+4
source share
1 answer

You can access the unexcited function using an operator :::(triple colon), previously using the name of the package namespace (that is, the name of the package).

, pkgA unexported.func(), unexported.func(), :

debug(pkgA:::unexported.func)

, (, ) , getAnywhere().

+6

All Articles