Last updated on 2024-08-09 12:49:37 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 3.3.0 | 49.10 | 377.82 | 426.92 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 3.3.0 | 32.47 | 229.24 | 261.71 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 3.3.0 | 946.00 | NOTE | |||
r-devel-linux-x86_64-fedora-gcc | 3.3.0 | 897.58 | NOTE | |||
r-devel-windows-x86_64 | 3.3.0 | 48.00 | 513.00 | 561.00 | NOTE | |
r-patched-linux-x86_64 | 3.3.0 | 66.37 | 508.09 | 574.46 | OK | |
r-release-linux-x86_64 | 3.3.0 | 46.73 | 504.99 | 551.72 | OK | |
r-release-macos-arm64 | 3.3.0 | 125.00 | OK | |||
r-release-macos-x86_64 | 3.3.0 | 262.00 | OK | |||
r-release-windows-x86_64 | 3.3.0 | 47.00 | 492.00 | 539.00 | OK | |
r-oldrel-macos-arm64 | 3.3.0 | 138.00 | OK | |||
r-oldrel-macos-x86_64 | 3.3.0 | 278.00 | OK | |||
r-oldrel-windows-x86_64 | 3.3.0 | 64.00 | 663.00 | 727.00 | OK |
Version: 3.3.0
Check: package dependencies
Result: NOTE
Package suggested but not available for checking: ‘copula’
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Version: 3.3.0
Check: Rd cross-references
Result: NOTE
Found the following Rd file(s) with Rd \link{} targets missing package
anchors:
FixedDiscrDiscrIT.Rd: logistf
Please provide package anchors for all Rd \link{} targets not in the
package itself and the base packages.
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-windows-x86_64
Version: 3.3.0
Check: examples
Result: ERROR
Running examples in ‘Surrogate-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: fit_model_SurvSurv
> ### Title: Fit Survival-Survival model
> ### Aliases: fit_model_SurvSurv
>
> ### ** Examples
>
> if(require(Surrogate)) {
+ data("Ovarian")
+ #For simplicity, data is not recoded to semi-competing risks format, but is
+ #left in the composite event format.
+ data = data.frame(Ovarian$Pfs,
+ Ovarian$Surv,
+ Ovarian$Treat,
+ Ovarian$PfsInd,
+ Ovarian$SurvInd)
+ Surrogate::fit_model_SurvSurv(data = data,
+ copula_family = "clayton",
+ n_knots = 1)
+ }
Loading required namespace: copula
Failed with error: ‘there is no package called ‘copula’’
Error in loadNamespace(x) : there is no package called ‘copula’
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Version: 3.3.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [123s/162s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(Surrogate)
>
> test_check("Surrogate")
Loading required namespace: cubature
Loading required namespace: FNN
Loading required namespace: parallel
[1] "Starting parallel simulations"
[1] "Finishing parallel simulations"
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: fitdistrplus
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
[ FAIL 15 | WARN 0 | SKIP 9 | PASS 31 ]
══ Skipped tests (9) ═══════════════════════════════════════════════════════════
• On CRAN (9): 'test-MetaAnalyticSurvBin.R:3:13',
'test-MetaAnalyticSurvCat.R:3:13', 'test-MetaAnalyticSurvCont.R:3:13',
'test-MetaAnalyticSurvSurv.R:3:13', 'test-fit_model_SurvSurv.R:37:13',
'test-fit_model_SurvSurv.R:58:13', 'test-goodness_of_fit_SurvSurv.R:19:13',
'test-sensitivity_analysis_SurvSurv.R:44:3',
'test-sensitivity_intervals.R:94:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-fit_model_BinCont_copula.R:71:3'): twostep_BinCont() works with clayton copula and gamma margins ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate:::BinCont_starting_values(...) at test-fit_model_BinCont_copula.R:71:3
2. └─base::loadNamespace(x)
3. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
4. └─base (local) withOneRestart(expr, restarts[[1L]])
5. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_BinCont_copula.R:95:3'): twostep_BinCont() works with gaussian copula and weibull margins ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate:::BinCont_starting_values(...) at test-fit_model_BinCont_copula.R:95:3
2. └─base::loadNamespace(x)
3. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
4. └─base (local) withOneRestart(expr, restarts[[1L]])
5. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_BinCont_copula.R:119:3'): fit_copula_submodel_BinCont() works with clayton copula and lognormal margins ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate:::fit_copula_submodel_BinCont(...) at test-fit_model_BinCont_copula.R:119:3
2. │ └─Surrogate:::twostep_BinCont(X, Y, copula_family, marginal_surrogate)
3. │ └─Surrogate:::BinCont_starting_values(X, Y, copula_family, marginal_surrogate)
4. └─base::loadNamespace(x)
5. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
6. └─base (local) withOneRestart(expr, restarts[[1L]])
7. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_BinCont_copula.R:148:3'): fit_model_binCont_copula() works with clayton copula and lognormal margins and twostep estimator ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::fit_copula_model_BinCont(...) at test-fit_model_BinCont_copula.R:148:3
2. │ └─Surrogate:::twostep_BinCont(...)
3. │ └─Surrogate:::BinCont_starting_values(X, Y, copula_family, marginal_surrogate)
4. └─base::loadNamespace(x)
5. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
6. └─base (local) withOneRestart(expr, restarts[[1L]])
7. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_BinCont_copula.R:178:5'): fit_model_binCont_copula() works with clayton copula and lognormal margins and full ML estimator ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::fit_copula_model_BinCont(...) at test-fit_model_BinCont_copula.R:178:5
2. │ └─Surrogate:::fit_copula_submodel_BinCont(...)
3. │ └─Surrogate:::twostep_BinCont(X, Y, copula_family, marginal_surrogate)
4. │ └─Surrogate:::BinCont_starting_values(X, Y, copula_family, marginal_surrogate)
5. └─base::loadNamespace(x)
6. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
7. └─base (local) withOneRestart(expr, restarts[[1L]])
8. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_BinCont_copula.R:206:3'): fit_model_binCont_copula() works with clayton copula and normal margins and full ML estimator ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::fit_copula_model_BinCont(...) at test-fit_model_BinCont_copula.R:206:3
2. │ └─Surrogate:::fit_copula_submodel_BinCont(...)
3. │ └─Surrogate:::twostep_BinCont(X, Y, copula_family, marginal_surrogate)
4. │ └─Surrogate:::BinCont_starting_values(X, Y, copula_family, marginal_surrogate)
5. └─base::loadNamespace(x)
6. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
7. └─base (local) withOneRestart(expr, restarts[[1L]])
8. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_SurvSurv.R:11:13'): SurvivalSurvival model works with Clayton and Gaussian copula for Ovarian data ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::fit_model_SurvSurv(...) at test-fit_model_SurvSurv.R:11:13
2. │ └─Surrogate:::twostep_SurvSurv(...)
3. │ └─Surrogate:::SurvSurv_starting_values(...)
4. └─base::loadNamespace(x)
5. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
6. └─base (local) withOneRestart(expr, restarts[[1L]])
7. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_SurvSurv.R:28:13'): SurvivalSurvival model works with Clayton and Gumbel copula for Ovarian data and variable number of knots ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::fit_model_SurvSurv(...) at test-fit_model_SurvSurv.R:28:13
2. │ └─Surrogate:::twostep_SurvSurv(...)
3. │ └─Surrogate:::SurvSurv_starting_values(...)
4. └─base::loadNamespace(x)
5. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
6. └─base (local) withOneRestart(expr, restarts[[1L]])
7. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-sensitivity_analysis_BinCont_copula.R:7:13'): sensitivity_analysis_BinCont_copula() works in a simplified setting ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_BinCont_copula(...) at test-sensitivity_analysis_BinCont_copula.R:7:13
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_BinCont_copula.R:28:13'): sensitivity_analysis_BinCont_copula() works in a simplified setting with limits in the sensitivity analysis ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_BinCont_copula(...) at test-sensitivity_analysis_BinCont_copula.R:28:13
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_SurvSurv.R:6:3'): sensitivity_analysis_SurvSurv_copula() works on a single core with Clayton copula ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_SurvSurv_copula(...) at test-sensitivity_analysis_SurvSurv.R:6:3
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_SurvSurv.R:26:3'): sensitivity_analysis_SurvSurv_copula() works with variable number of knots ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_SurvSurv_copula(...) at test-sensitivity_analysis_SurvSurv.R:26:3
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_SurvSurv.R:70:3'): sensitivity_analysis_SurvSurv_copula() works on a single core with variable copula ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_SurvSurv_copula(...) at test-sensitivity_analysis_SurvSurv.R:70:3
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_SurvSurv.R:88:3'): sensitivity_analysis_SurvSurv_copula() works on a single core with Clayton copula and four different unidentifiable copulas ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_SurvSurv_copula(...) at test-sensitivity_analysis_SurvSurv.R:88:3
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_SurvSurv.R:138:3'): sensitivity_analysis_SurvSurv_copula() wth restricted survival times and Spearman's rho as ICA ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_SurvSurv_copula(...) at test-sensitivity_analysis_SurvSurv.R:138:3
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
[ FAIL 15 | WARN 0 | SKIP 9 | PASS 31 ]
Deleting unused snapshots:
• goodness_of_fit_SurvSurv/marginal-survival-functions-gof.svg
• goodness_of_fit_SurvSurv/prob-of-dying-wo-progression-gof.svg
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 3.3.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [69s/85s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(Surrogate)
>
> test_check("Surrogate")
Loading required namespace: cubature
Loading required namespace: FNN
Loading required namespace: parallel
[1] "Starting parallel simulations"
[1] "Finishing parallel simulations"
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: fitdistrplus
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
Loading required namespace: copula
Failed with error: 'there is no package called 'copula''
[ FAIL 15 | WARN 0 | SKIP 9 | PASS 31 ]
══ Skipped tests (9) ═══════════════════════════════════════════════════════════
• On CRAN (9): 'test-MetaAnalyticSurvBin.R:3:13',
'test-MetaAnalyticSurvCat.R:3:13', 'test-MetaAnalyticSurvCont.R:3:13',
'test-MetaAnalyticSurvSurv.R:3:13', 'test-fit_model_SurvSurv.R:37:13',
'test-fit_model_SurvSurv.R:58:13', 'test-goodness_of_fit_SurvSurv.R:19:13',
'test-sensitivity_analysis_SurvSurv.R:44:3',
'test-sensitivity_intervals.R:94:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-fit_model_BinCont_copula.R:71:3'): twostep_BinCont() works with clayton copula and gamma margins ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate:::BinCont_starting_values(...) at test-fit_model_BinCont_copula.R:71:3
2. └─base::loadNamespace(x)
3. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
4. └─base (local) withOneRestart(expr, restarts[[1L]])
5. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_BinCont_copula.R:95:3'): twostep_BinCont() works with gaussian copula and weibull margins ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate:::BinCont_starting_values(...) at test-fit_model_BinCont_copula.R:95:3
2. └─base::loadNamespace(x)
3. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
4. └─base (local) withOneRestart(expr, restarts[[1L]])
5. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_BinCont_copula.R:119:3'): fit_copula_submodel_BinCont() works with clayton copula and lognormal margins ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate:::fit_copula_submodel_BinCont(...) at test-fit_model_BinCont_copula.R:119:3
2. │ └─Surrogate:::twostep_BinCont(X, Y, copula_family, marginal_surrogate)
3. │ └─Surrogate:::BinCont_starting_values(X, Y, copula_family, marginal_surrogate)
4. └─base::loadNamespace(x)
5. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
6. └─base (local) withOneRestart(expr, restarts[[1L]])
7. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_BinCont_copula.R:148:3'): fit_model_binCont_copula() works with clayton copula and lognormal margins and twostep estimator ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::fit_copula_model_BinCont(...) at test-fit_model_BinCont_copula.R:148:3
2. │ └─Surrogate:::twostep_BinCont(...)
3. │ └─Surrogate:::BinCont_starting_values(X, Y, copula_family, marginal_surrogate)
4. └─base::loadNamespace(x)
5. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
6. └─base (local) withOneRestart(expr, restarts[[1L]])
7. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_BinCont_copula.R:178:5'): fit_model_binCont_copula() works with clayton copula and lognormal margins and full ML estimator ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::fit_copula_model_BinCont(...) at test-fit_model_BinCont_copula.R:178:5
2. │ └─Surrogate:::fit_copula_submodel_BinCont(...)
3. │ └─Surrogate:::twostep_BinCont(X, Y, copula_family, marginal_surrogate)
4. │ └─Surrogate:::BinCont_starting_values(X, Y, copula_family, marginal_surrogate)
5. └─base::loadNamespace(x)
6. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
7. └─base (local) withOneRestart(expr, restarts[[1L]])
8. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_BinCont_copula.R:206:3'): fit_model_binCont_copula() works with clayton copula and normal margins and full ML estimator ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::fit_copula_model_BinCont(...) at test-fit_model_BinCont_copula.R:206:3
2. │ └─Surrogate:::fit_copula_submodel_BinCont(...)
3. │ └─Surrogate:::twostep_BinCont(X, Y, copula_family, marginal_surrogate)
4. │ └─Surrogate:::BinCont_starting_values(X, Y, copula_family, marginal_surrogate)
5. └─base::loadNamespace(x)
6. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
7. └─base (local) withOneRestart(expr, restarts[[1L]])
8. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_SurvSurv.R:11:13'): SurvivalSurvival model works with Clayton and Gaussian copula for Ovarian data ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::fit_model_SurvSurv(...) at test-fit_model_SurvSurv.R:11:13
2. │ └─Surrogate:::twostep_SurvSurv(...)
3. │ └─Surrogate:::SurvSurv_starting_values(...)
4. └─base::loadNamespace(x)
5. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
6. └─base (local) withOneRestart(expr, restarts[[1L]])
7. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-fit_model_SurvSurv.R:28:13'): SurvivalSurvival model works with Clayton and Gumbel copula for Ovarian data and variable number of knots ──
<packageNotFoundError/error/condition>
Error in `loadNamespace(x)`: there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::fit_model_SurvSurv(...) at test-fit_model_SurvSurv.R:28:13
2. │ └─Surrogate:::twostep_SurvSurv(...)
3. │ └─Surrogate:::SurvSurv_starting_values(...)
4. └─base::loadNamespace(x)
5. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
6. └─base (local) withOneRestart(expr, restarts[[1L]])
7. └─base (local) doWithOneRestart(return(expr), restart)
── Error ('test-sensitivity_analysis_BinCont_copula.R:7:13'): sensitivity_analysis_BinCont_copula() works in a simplified setting ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_BinCont_copula(...) at test-sensitivity_analysis_BinCont_copula.R:7:13
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_BinCont_copula.R:28:13'): sensitivity_analysis_BinCont_copula() works in a simplified setting with limits in the sensitivity analysis ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_BinCont_copula(...) at test-sensitivity_analysis_BinCont_copula.R:28:13
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_SurvSurv.R:6:3'): sensitivity_analysis_SurvSurv_copula() works on a single core with Clayton copula ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_SurvSurv_copula(...) at test-sensitivity_analysis_SurvSurv.R:6:3
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_SurvSurv.R:26:3'): sensitivity_analysis_SurvSurv_copula() works with variable number of knots ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_SurvSurv_copula(...) at test-sensitivity_analysis_SurvSurv.R:26:3
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_SurvSurv.R:70:3'): sensitivity_analysis_SurvSurv_copula() works on a single core with variable copula ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_SurvSurv_copula(...) at test-sensitivity_analysis_SurvSurv.R:70:3
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_SurvSurv.R:88:3'): sensitivity_analysis_SurvSurv_copula() works on a single core with Clayton copula and four different unidentifiable copulas ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_SurvSurv_copula(...) at test-sensitivity_analysis_SurvSurv.R:88:3
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
── Error ('test-sensitivity_analysis_SurvSurv.R:138:3'): sensitivity_analysis_SurvSurv_copula() wth restricted survival times and Spearman's rho as ICA ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map2(.x = copula_family2, .y = u, .f = function(x, y) {
switch(x, frank = {
copula_fun = copula::frankCopula()
upper_limit = 35
}, gaussian = {
copula_fun = copula::ellipCopula(family = "normal")
upper_limit = 1
}, clayton = {
copula_fun = copula::claytonCopula()
upper_limit = 28
}, gumbel = {
copula_fun = copula::gumbelCopula()
upper_limit = 50
})
c_vec = purrr::map_dbl(.x = y, .f = function(x) copula::iRho(copula_fun,
rho = x))
if (x == "clayton")
c_vec = ifelse(y < 5 * 1e-04, 1e-05, c_vec)
c_vec = ifelse(c_vec > upper_limit | is.na(c_vec), upper_limit,
c_vec)
return(c_vec)
})`: i In index: 1.
Caused by error in `loadNamespace()`:
! there is no package called 'copula'
Backtrace:
▆
1. ├─Surrogate::sensitivity_analysis_SurvSurv_copula(...) at test-sensitivity_analysis_SurvSurv.R:138:3
2. │ └─Surrogate:::sample_copula_parameters(...)
3. │ └─purrr::map2(...)
4. │ └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
5. │ ├─purrr:::with_indexed_errors(...)
6. │ │ └─base::withCallingHandlers(...)
7. │ ├─purrr:::call_with_cleanup(...)
8. │ └─Surrogate (local) .f(.x[[i]], .y[[i]], ...)
9. ├─base::loadNamespace(x)
10. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
11. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
12. │ │ └─base (local) doWithOneRestart(return(expr), restart)
13. │ └─base::stop(cond)
14. └─purrr (local) `<fn>`(`<pckgNtFE>`)
15. └─cli::cli_abort(...)
16. └─rlang::abort(...)
[ FAIL 15 | WARN 0 | SKIP 9 | PASS 31 ]
Deleting unused snapshots:
• goodness_of_fit_SurvSurv/marginal-survival-functions-gof.svg
• goodness_of_fit_SurvSurv/prob-of-dying-wo-progression-gof.svg
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 3.3.0
Check: package dependencies
Result: NOTE
Imports includes 22 non-default packages.
Importing from so many packages makes the package vulnerable to any of
them becoming unavailable. Move as many as possible to Suggests and
use conditionally.
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 3.3.0
Check: dependencies in R code
Result: NOTE
Namespace in Imports field not imported from: ‘optimx’
All declared Imports should be used.
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc