[BioC] how to build a R package with the inclusion of inst/extdata

Yue Li gorillayue at gmail.com
Fri Sep 7 01:21:30 CEST 2012

Hi Steven,

Thanks for the quick response. I think I probably didn't articulate my intend clearly.

Basically, I'm trying to develop a R package rather than using someone else's package. In order to run some examples I have for the functions I wrote, I need to have BAM data saved in the "inst/extdata" (or anywhere for that matters). So when I call:

R CMD check mypackage

The example that says something like

testfiles <- system.file("inst/extdata/*bam$", package = "mypackage", )

can give me the BAM files saved in that inst/extdata/ that come with the tar ball package. But I'm too ignorant to figure out how to do that.


On 2012-09-06, at 6:37 PM, Steve Lianoglou <mailinglist.honeypot at gmail.com> wrote:

> Hi,
> On Thu, Sep 6, 2012 at 6:25 PM, Yue Li <gorillayue at gmail.com> wrote:
>> Dear list,
>> I wonder if anyone could hint me on how to build a R package with the inclusion of "inst/extdata". Basically, I'm trying to build a R package with some BAM files as my test data used in the examples session from the Rd files.
>> If I simply go:
>> package.skeleton(name="myPackage", code_files=sourceCode, path="packageBuild")
>> and manually copy and past the folder "inst" into the outDir folder then try:
>> R CMD build packageBuild
> Shouldn't you rather be `cd`-ing into the `packageBuild` directory,
> then running `R CMD INSTALL myPackage`?
> -steve
> -- 
> Steve Lianoglou
> Graduate Student: Computational Systems Biology
> | Memorial Sloan-Kettering Cancer Center
> | Weill Medical College of Cornell University
> Contact Info: http://cbio.mskcc.org/~lianos/contact

More information about the Bioconductor mailing list