[BioC] Access source code of internal function within R

heyi xiao xiaoheyiyh at yahoo.com
Tue Jul 23 19:02:38 CEST 2013


I checked source code for summarizeOverlaps method in Rsamtools package and found that it calls some internal function .processBamFiles. And I want to check the details of this internal function, and I tried various methods which usually work for me, but no luck this time.

> library(Rsamtools)
..
> Rsamtools:::.processBamFile
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : 
  object '.processBamFile' not found
> getAnywhere(".processBamFile")
no object named '.processBamFile' was found

In the end, I downloaded the Rsamtools source package and located the source code chunk for function .processBamFiles. But this is kind of awkward. Anyone knows why “:::” and getAnywhere don’t work, and are there better ways to access the source code of internal function within R? Thanks!
Heyi



More information about the Bioconductor mailing list