[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bioc-devel
Subject:    Re: [Bioc-devel] data package
From:       "Sean Davis" <sdavis2 () mail ! nih ! gov>
Date:       2008-02-07 14:32:25
Message-ID: 264855a00802070632l73864ce9tf51446b5916ee517 () mail ! gmail ! com
[Download RAW message or body]

On Feb 7, 2008 9:20 AM, John Lande <john.lande77@gmail.com> wrote:
> Dear Bioc,
>
> I am creating an R package for Bioconductor.
> I am supplying sample data with the package.
>
> Please tell me which is the best way to supply this data to those who will
> then use my package ?
>
> I see two alternatives:
>
> 1. Put the sample data tables (in .csv format) in the package's "data"
> subdirectory.
>    In the documentation I supply with my package, put an R statement which
> imports
>    those .csv files from the above "data" subdirectory.
>
>    But how do I find out where (it may be different on different platforms)
> the user has installed my
>    package ?
>    I need this information in order to tell my data import command, from
> which directory to
>    load the above sample data files.

You probably want to read up on using system.file() for the above, but
I'm not sure that is what you are looking for as a final solution.

>
> 2. Put the sample tables in a .Rdata workspace.
>    In my documentation, put an R statement that loads the above .Rdata file.

You probably want to use the "data" subdirectory to store your
files/objects.  Then, you can load them using the data() command.  The
"Writing R Extensions Manual" has some details:

http://cran.r-project.org/doc/manuals/R-exts.html#Package-subdirectories

Hope that helps.

Sean

_______________________________________________
Bioc-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic