我正在使用 renv 使我的项目可重现。
但是,我需要两个在使用时没有自动考虑的包renv::snapshot()(我认为和包是rnaturalearthdata和gifski包的两个依赖项)。rnaturalearthknitr
因此,我不得不使用手动保存它们renv::record(<package>@<version>)
现在的问题是,当我使用 时renv::status(),我有以下内容:
The following package(s) are no longer used in this project:
_
gifski [0.8.6]
rnaturalearthdata [0.1.0]
Use `renv::snapshot()` to remove them from the lockfile.
(这是正常的,因为我没有直接在我的项目中使用 调用这些包library(),但是它们是从它们的依赖项中自动导入的)
有没有办法告诉 renv 它可以根据需要考虑它们?因为下次我renv::snapshot()用来添加其他包时,我不希望这两个包被删除。