[R-pkg-devel] finding "logo.jpg" [was: "try" malfunctions on Ubuntu Linux 16.04 LTS, R-release, GCC]
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Mon Feb 3 22:23:33 CET 2020
On 3 February 2020 at 23:58, Ivan Krylov wrote:
| On Mon, 3 Feb 2020 13:30:11 -0600
| Spencer Graves <spencer.graves using effectivedefense.org> wrote:
|
| > logo.jpg <- paste(R.home(), "doc", "html", "logo.jpg", sep
| > = .Platform$file.sep)
|
| I wonder whether file.path(R.home('doc'), 'html', 'logo.jpg') would be
| more portable. Are there R installations built without the HTML docs?
It's the only correct form. And of course it finds the desired file:
R> file.path(R.home('doc'), 'html', 'logo.jpg')
[1] "/usr/share/R/doc/html/logo.jpg"
R>
because it knows about
R> Sys.getenv("R_SHARE_DIR")
[1] "/usr/share/R/share"
R>
because, as Inaki reminded everyone, most distro had non-architecture
dependent files below /usr/share for years.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-package-devel
mailing list