I have a function that outputs / compiles some latex. To do this I use Sys.which('pdflatex') and if nothing is found, prompt the user whether to install tinytex package. So, normally I understand the use of 'Suggests' in the package description to be for when there are only certain functions / tests that require the package. In this case, the package requirement is also conditional on other software (ie a tex distribution) not being found, otherwise it is unnecessary. There are no tests or examples that depend on the package. Should tinytex be in the 'Suggests' list?
Cheers,
Charles
[R-pkg-devel] Appropriate usage of 'Suggests' -- package installed conditional on other software not found
3 messages · Driver, Charles, Michael Dewey, Dirk Eddelbuettel
Dear Charles If your package prints a message to the user suggesting how to get a Latex installation then I do not think you need to do anything else. After all they could install Latex some other way if they pleased or try to work out why the installation they thought they had is not working. Michael
On 03/10/2019 11:10, Driver, Charles wrote:
I have a function that outputs / compiles some latex. To do this I use Sys.which('pdflatex') and if nothing is found, prompt the user whether to install tinytex package. So, normally I understand the use of 'Suggests' in the package description to be for when there are only certain functions / tests that require the package. In this case, the package requirement is also conditional on other software (ie a tex distribution) not being found, otherwise it is unnecessary. There are no tests or examples that depend on the package. Should tinytex be in the 'Suggests' list?
Cheers,
Charles
[[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel --- This email has been checked for viruses by AVG. https://www.avg.com
Charles,
On 3 October 2019 at 10:10, Driver, Charles wrote:
| I have a function that outputs / compiles some latex. To do this I use Sys.which('pdflatex') and if nothing is found, prompt the user whether to install tinytex package. So, normally I understand the use of 'Suggests' in the package description to be for when there are only certain functions / tests that require the package. In this case, the package requirement is also conditional on other software (ie a tex distribution) not being found, otherwise it is unnecessary. There are no tests or examples that depend on the package. Should tinytex be in the 'Suggests' list?
A few suggestions:
- IIRC CRAN Policy asks you to not have interactive prompts, and clearly
prohibits messing with the system. So no to the prompt to install.
- CRAN and R have a perfectly working dependency system [1] so just use
'Suggests: tinytex' and _then please condition your code on whether it is
present_. [2]
- Maybe add line breaks to your post? ;-)
Dirk
[1] I continue to argue, as recently as yesterday in private mail with a
junior dev, that people misuse / misunderstand Depends and Suggests.
[2] Because if you don't your Suggests: really is a Depends:.
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org