[R-pkg-devel] Rcmd check and sourcing URL issues
Andrew Simmons
@kw@|mmo @end|ng |rom gm@||@com
Tue Mar 16 19:02:30 CET 2021
Hello,
I am the maintainer of this.path
<https://CRAN.R-project.org/package=this.path>, and as you can see
from the CRAN
checks <https://cran.r-project.org/web/checks/check_results_this.path.html>,
it flags a NOTE that package testthat
<https://CRAN.R-project.org/package=testthat> is undeclared in the R
documentation references. this.path allows an R script to know its own path
(from 'RStudio', 'RGui', the command-line, and when using 'source' or any
source equivalents), and I recently added functionality to this.path when
using testthat::source_file. However, I don't know how to go about
declaring package testthat such that I can use it reference it in the R
documentation WITHOUT forcing testthat to load or attach itself when
this.path is loaded or attached (I don't want to declare testthat is the
Imports or Depends field of the DESCRIPTION file).
Another issue related to this.path and base::source, but the fix for this
is more opinionated than the above. If someone sources a URL which contains
a call to this.path, should this.path:
* skip that source call and look for the next available path (which may or
may not exist)
* throw an error that this.path is incompatible when sourcing URLs
* return the URL from that source call
Any help is greatly appreciated, thank you!
Regards,
Andrew Simmons
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list