[R-pkg-devel] Assistance with 'Surv' and 'is.Surv' Error in check_win_devel
Gabriel Constantino Blain
g@br|e|@b|@|n @end|ng |rom @p@gov@br
Tue Jan 28 11:01:00 CET 2025
Dear All,
When I run check_win_devel() on my package, I encounter the following error:
-------------------------
Error: objects 'Surv', 'is.Surv' are not exported by 'namespace:survival'
Execution halted
ERROR: lazy loading failed for package 'SPIChanges'
* removing 'd:/RCompile/CRANguest/R-devel/lib/SPIChanges'
----------------------
However, when I run devtools::check() locally, no errors are reported. I have already included the following directive in the function where the error seems to originate:
-------------------
#' @importFrom survival Surv is.Surv
------------
The issue seems to have started after I added the following lines to my code:
----------------------
loess_model <- stats::loess(zero_rain ~ time, span = 0.8)
prob_zero_rain <- Rmpfr::pmax(0, Rmpfr::pmin(1, stats::predict(loess_model)))
-----------
I do not call Surv or is.Surv explicitly in my package, and I suspect this error might be related to a dependency being triggered indirectly during lazy loading.
Any help or insights on how to resolve this would be greatly appreciated.
Thank you,
Gabriel Constantino Blain
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list