Running ‘testthat.R’ [101s/114s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(INDperform)
  > 
  > test_check("INDperform")
  ── 1. Failure: check gams under different distributions (@test_calc_deriv.R#82) 
  round(test5$prop, 1) not equal to 0.8.
  1/1 mismatches
  [1] 0.7 - 0.8 == -0.1
  
    variable required_data_type
  1      edf            numeric
  # A tibble: 2 x 5
       id ind   press nr_test_timesteps NAs_in_ind_press
    <int> <chr> <chr>             <int>            <int>
  1     1 TZA   Tsum                  3                3
  2     3 MS    Tsum                  3                3
    variable required_data_type
  1        a               list
  2        b             factor
  3        c          character
  [1] 1 1 1 1 1 1 1 2
  [1] 2 2 4 2 2 2 2 2
  ── 2. Failure: test sample_boot (@test_cond_boot.R#69)  ────────────────────────
  test1$considered[2] isn't true.
  
  ── 3. Failure: test sample_boot (@test_cond_boot.R#70)  ────────────────────────
  all(test2$considered[c(3, 4, 6)]) isn't true.
  
  # A tibble: 12 x 5
        id ind     press nr_test_timesteps NAs_in_ind_press
     <int> <chr>   <chr>             <int>            <int>
   1     1 TZA     Tsum                  3                3
   2     3 MS      Tsum                  3                3
   3     5 rCC     Tsum                  3                3
   4     7 Cops    Tsum                  3                3
   5     9 Micro   Tsum                  3                3
   6    11 rZPPP   Tsum                  3                3
   7    13 Sprat   Tsum                  3                3
   8    15 Herring Tsum                  3                3
   9    17 Stickle Tsum                  3                3
  10    19 Cod     Tsum                  3                3
  11    21 SPF     Tsum                  3                3
  12    23 LPF     Tsum                  3                3
  # A tibble: 1 x 5
       id ind      press nr_test_timesteps NAs_in_ind_press
    <int> <chr>    <chr>             <int>            <int>
  1     3 test_ind press                 3                3
    variable required_data_type
  1       id            integer
  # A tibble: 1 x 4
       id ind      press error_message                                            
    <int> <chr>    <chr> <chr>                                                    
  1     3 test_ind press "Error in mgcv::gam(stats::as.formula(paste0(names(dat)[…
  # A tibble: 1 x 6
       id ind   press model_type corrstruc error_message                          
    <int> <chr> <chr> <chr>      <chr>     <chr>                                  
  1    44 Sprat Swin  gamm       arma21    "Error in lme.formula(y ~ X - 1, rando…
  # A tibble: 1 x 6
       id ind   press model_type corrstruc error_message                          
    <int> <chr> <chr> <chr>      <chr>     <chr>                                  
  1    39 rZPPP Nwin  gamm       arma12    "Error in lme.formula(y ~ X - 1, rando…
  # A tibble: 1 x 6
       id ind   press model_type corrstruc error_message                          
    <int> <chr> <chr> <chr>      <chr>     <chr>                                  
  1    39 rZPPP Nwin  gamm       arma12    "Error in lme.formula(y ~ X - 1, rando…
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  # A tibble: 1 x 6
       id ind   press model_type corrstruc error_message                          
    <int> <chr> <chr> <chr>      <chr>     <chr>                                  
  1     1 TZA   Tsum  gamm       arma12    "Error in lme.formula(fixed = fixed, r…
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  # A tibble: 2 x 6
       id ind   press model_type corrstruc error_message                          
    <int> <chr> <chr> <chr>      <chr>     <chr>                                  
  1     1 TZA   Tsum  gamm       arma11    "Error in lme.formula(fixed = fixed, r…
  2     1 TZA   Tsum  gamm       arma21    "Error in lme.formula(fixed = fixed, r…
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  # A tibble: 3 x 6
       id ind   press model_type corrstruc error_message                          
    <int> <chr> <chr> <chr>      <chr>     <chr>                                  
  1     1 TZA   Tsum  gamm       arma11    "Error in lme.formula(fixed = fixed, r…
  2     1 TZA   Tsum  gamm       arma12    "Error in lme.formula(fixed = fixed, r…
  3     1 TZA   Tsum  gamm       arma21    "Error in lme.formula(fixed = fixed, r…
  # A tibble: 1 x 5
       id ind   press nr_test_timesteps NAs_in_ind_press
    <int> <chr> <chr>             <int>            <int>
  1     2 test  press                 3                3
    variable required_data_type
  1       id            integer
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  
   Maximum number of PQL iterations:  20 
  # A tibble: 6 x 6
       id ind   press model_type corrstruc error_message                          
    <int> <chr> <chr> <chr>      <chr>     <chr>                                  
  1     2 test  press gamm       none      "Error in mgcv::gamm(formula = form, d…
  2     2 test  press gamm       ar1       "Error in mgcv::gamm(formula = form, d…
  3     2 test  press gamm       ar2       "Error in mgcv::gamm(formula = form, d…
  4     2 test  press gamm       arma11    "Error in mgcv::gamm(formula = form, d…
  5     2 test  press gamm       arma12    "Error in mgcv::gamm(formula = form, d…
  6     2 test  press gamm       arma21    "Error in mgcv::gamm(formula = form, d…
  # A tibble: 1 x 3
    ind_id ind    error_message                                                   
     <int> <chr>  <chr>                                                           
  1      5 ind_na "Error in mgcv::gam(stats::as.formula(paste0(ind_name, \" ~ 1 +…
    variable required_data_type
  1      edf            numeric
    variable required_data_type
  1     pred               list
     press press_type
  1   Tsum   add here
  2   Swin   add here
  3   Pwin   add here
  4   Nwin   add here
  5 Fsprat   add here
  6   Fher   add here
  7   Fcod   add here
    variable required_data_type
  1      edf            numeric
  The conditions set in the crit_scores table for sub-criterion
  C9_1
  are not unique, i.e. conditions are met multiple times!
  Please correct your crit_score table before you continue.  variable required_data_type
  1      edf            numeric
    variable required_data_type
  1     r_sq            numeric
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 630 SKIPPED: 0 FAILED: 3
  1. Failure: check gams under different distributions (@test_calc_deriv.R#82) 
  2. Failure: test sample_boot (@test_cond_boot.R#69) 
  3. Failure: test sample_boot (@test_cond_boot.R#70) 
  
  Error: testthat unit tests failed
  Execution halted