From kasperdanielhansen at gmail.com  Wed Aug 17 14:29:28 2011
From: kasperdanielhansen at gmail.com (Kasper Daniel Hansen)
Date: Wed, 17 Aug 2011 08:29:28 -0400
Subject: [Rd] Referencing 'inst' directory in installed package
In-Reply-To: <A6A6DD95-ED16-4651-8902-76FB34C437C3@gmail.com>
References: <A6A6DD95-ED16-4651-8902-76FB34C437C3@gmail.com>
Message-ID: <CAC2h7uuCf4a8zbh_jp67v7EkNHvHk4o0p-1WB_47W4BGs8977A@mail.gmail.com>

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
>



[Rd] Referencing 'inst' directory in installed package
Kasper Daniel Hansen