在 R 包 DESCRIPTION 中描述命令行程序作为要求

Describe in R package DESCRIPTION a command line program as a requirement

我正在尝试编写一个依赖 latexmk 的 R 包。

但是,我找不到如何在包的 DESCRIPTION 中说明它需要 latexmk 安装。我希望有人以前处理过这个问题并能给我一些帮助。

如果这不可能,如果在 PATH 上找不到命令,是否有任何方法可以在安装包时提供自定义警告消息?

你想要SystemRequirements: latexmk.

参见 Section 1.1.1 "The DESCRIPTION File" 编写 R 扩展:

Dependencies external to the R system should be listed in the ‘SystemRequirements’ field, possibly amplified in a separate README file.

在手册的后面部分中很少提及该字段。