[Rd] Code tools for identifying which package A functions package B use?

Henrik Bengtsson hb at biostat.ucsf.edu
Sat Nov 15 06:49:37 CET 2014


Thanks Kasper, that seems to do it:

$ url=https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/codetoolsBioC
$ svn checkout --username readonly --password readonly $url
$ R CMD build codetoolsBioC
$ R CMD INSTALL codetoolsBioC
$ R

> library("codetoolsBioC")
> deps <- findExternalDeps("MASS")
attaching required packages 'MASS'
Loading required package: MASS
> str(deps)
List of 4
 $ S4Classes: list()
 $ S4Methods:List of 1
  ..$ methods: chr "body<-"
 $ functions:List of 5
  ..$ base     : chr [1:248] "-" "!" "!=" "$" ...
  ..$ graphics : chr [1:16] "abline" "axis" "box" "frame" ...
  ..$ grDevices: chr [1:5] "dev.flush" "dev.hold" "nclass.FD" ...
  ..$ methods  : chr "new"
  ..$ stats    : chr [1:97] ".checkMFClasses" ".getXlevels" ...
 $ variables:List of 1
  ..$ base: chr [1:4] ".GlobalEnv" ".Machine" ".Options" "pi"
>

Great!

/Henrik

On Fri, Nov 14, 2014 at 8:41 PM, Kasper Daniel Hansen
<kasperdanielhansen at gmail.com> wrote:
> The best thing I have found is codetoolsBioC in the Bioconductor subversion
> repository.
>
> Best,
> Kasper
>
> On Fri, Nov 14, 2014 at 9:57 PM, Henrik Bengtsson <hb at biostat.ucsf.edu>
> wrote:
>>
>> Hi,
>>
>> I'd like to list all package PkgA functions that another package PkgB
>> use via Depends or Imports (ignoring Suggests for simplicity).  As
>> long as PkgB uses importFrom("PkgA", ...) it's just a matter of
>> parsing the NAMESPACE file or inspecting
>> asNamespace("PkgB")$.__NAMESPACE__.$imports.  However, what can be
>> done in case PkgB uses import("PkgA")?  Is there a function/package
>> already available for this?
>>
>> Thanks,
>>
>> Henrik
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



More information about the R-devel mailing list