In a package I'm writing, I'm placing all SQL code here: /inst/sql/ And so when referring to these blocks of code from the package's R code, I do something like so:
system.file("sql", "my_example_file.sql", package = "ThisPackage", mustWork = TRUE) But, referring to the package itself with the string "ThisPackage" is annoying and somewhat brittle... if the package were ever to change names (e.g. during development), I'll have to replace all such calls with the new package name. And generally referring to the package containing the code itself by name seems inelegant. Anyone know of a safe way to reference additional files in a package, from within that package's code, that doesn't require specifying the name of the package as a string? Cheers, -Murat ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.