Re: [R] Loading text file from data folder of package

2010-07-07 Thread Henrique Dallazuanna
See ?system.file On Wed, Jul 7, 2010 at 10:20 AM, Andrew Liu wrote: > Hello, > > I am creating a package and in my vignette I would like to load a text file > from the data folder of the package. Currently, I am doing the following: > > filepath <- paste(.libPaths(), "pkgname", "data", "sample.t

[R] Loading text file from data folder of package

2010-07-07 Thread Andrew Liu
Hello, I am creating a package and in my vignette I would like to load a text file from the data folder of the package. Currently, I am doing the following: filepath <- paste(.libPaths(), "pkgname", "data", "sample.txt", sep = "/") file(filepath) Is there a better way of doing this? Thanks,