Closed JohnReid closed 8 years ago
Check out profvis for a tool that can be used to profile R6 methods. Methods will still show up as <Anonymous>
, but you should be able to identify them from other information provided by profvis. In order for the methods to not show as <Anonymous>
, you could save them in a temporary variable and then invoke that (as in foo <- self$foo; foo()
). If you don't want to do that kind of workaround, the R profiler itself would have to provide more information. This may happen in the future, but it's not something that can be addressed from the R6 package.
If you're using a recent version of R-devel (since this commit), it will output obj$fn
instead of <Anonymous>
in the profiling data. This should be in the next release of R (3.3.0?).
Great thanks, I'll check this out.
For more details see http://stackoverflow.com/questions/31984006/how-to-profile-r6-class-functions