Re: [Rd] Referencing 'inst' directory in installed package

From: Kasper Daniel Hansen <kasperdanielhansen_at_gmail.com>
Date: Wed, 17 Aug 2011 08:29:28 -0400

On Tue, Aug 16, 2011 at 11:17 PM, Jonathan Malmaud <malmaud_at_gmail.com> wrote:
> Hi,
> My R package has files in the 'inst' directory that it needs to reference. How can the R scripts in my package find out the full path to the 'inst' directory after the package is installed, given that different users may have installed the package to different libraries?

The inst directory does not exists after installation (this is described in R-exts). Use something like

   system.file("extdata", package = "MyPackage") to locate a directory etc.

Kasper

>
> Thanks,
> Jon Malmaud
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 17 Aug 2011 - 12:30:53 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 17 Aug 2011 - 12:40:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive