Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will R auto install SystemRequirements: for users that don't have that program already

Tags:

package

r

When a user installs a package with a SystemRequirements: and they don't already have the program/package installed will R install it?

The clipr package is perfect example of this question: https://github.com/mdlincoln/clipr/blob/master/DESCRIPTION. If a package declares a SystemRequirements: in the 'DESCRIPTION' file will it be installed by R for checking?

clipr DESCRIPTION File

Package: clipr
Type: Package
Title: Read and Write from the System Clipboard
Version: 0.2.0.9000
Authors@R: c(
  person("Matthew", "Lincoln", email = "[email protected]", role = c("aut", "cre")),
  person("Louis", "Maddox", role = "ctb"))
Description: Simple utility functions to read from and write to the Windows,
  OS X, and X11 clipboards.
Imports: utils
SystemRequirements: xclip (http://sourceforge.net/projects/xclip/) or xsel
  (http://www.vergenet.net/~conrad/software/xsel/) for accessing the X11
  clipboard
License: GPL-3
LazyData: TRUE
Suggests: testthat
URL: https://github.com/mdlincoln/clipr
BugReports: https://github.com/mdlincoln/clipr/issues

I have consulted the Writing R Extensions section on the DESCRIPTION file and can't find the answer to my question.

like image 729
Tyler Rinker Avatar asked Sep 26 '22 00:09

Tyler Rinker


1 Answers

No. In general R won't do that because how could it? The SystemRequirements is a text field with no specification that could tell R how to install the requirement on any given system.

There are some packages that will after their installation check to see if the other requirements are present on the system and offer to download and install them for the user but that is entirely up to the package author and is not guaranteed.

If you want some proof you'll just have to believe me but I installed clipr on my system and neither xsel or xclip were installed in the process. I think a lot of people can also attest to having Java issues because Java doesn't automatically get installed when rJava is installed.

like image 142
Dason Avatar answered Sep 29 '22 08:09

Dason