Do I need to import RccpEigen in the DESCRIPTION file for an R package using it, or is “LinkingTo” enough?

ⅰ亾dé卋堺 提交于 2019-12-01 09:12:05

Briefly:

  1. There are currently 25 packages on CRAN which use RcppEigen. That makes 25 working case studies. You could look at one or two.
  2. LinkingTo: is generally enough.
  3. It may be a bug that the skeleton generator still adds Imports. We no longer do that in RcppArmadillo.

When I just ran the corresponding function for RcppArmadillo, I got

Imports: Rcpp (>= 0.11.3)
LinkingTo: Rcpp, RcppArmadillo

so I am leaning towards a bug. And I now opened an issue ticket for it.

More broadly, the differences between LinkingTo: and Imports: are

  • Imports: is the preferred, modern alternative to Depends; you also need to use NAMESPACE
  • LinkingTo: is chiefly used to point to header files as we do here.

So Writing R Extensions, or Hadley's online book for details.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!