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,
Andrew

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to