Unexported object imported by a ':::' call: 'tsfeatures:::scalets'

Sca*_*ett 4 r package

After doing devtools::check(cran=TRUE) I got this warning. I saw others say we cannot use ":::" on CRAN. So, how to fix this problem? Thank you for helping!

> checking dependencies in R code ... NOTE
  Unexported object imported by a ':::' call: 'tsfeatures:::scalets'
    See the note in ?`:::` about the use of this operator.
Run Code Online (Sandbox Code Playgroud)

pol*_*kas 6

在这里你可以找到答案。 https://github.com/drsimonj/twidlr/issues/16

总结起来有很多选择:

  • 联系包作者,要求他们导出相关函数。
  • 复制函数源代码并适当引用作者。在 man 文件中使用 roxygen2 @references 或手动 \references。在我看来,如果此功能是您包中的众多功能之一,则功能级别的参考是令人满意的。请记住,特定功能可能取决于包中的许多其他功能,因此必须复制大量代码。
  • 另一个技巧是使用 getFromNamespace() fun <- utils::getFromNamespace("fun", "pkg")。当你构建一个包时,函数的顺序和位置是不相关的(除非你使用 S4 或其他奇异的对象)。