Running ‘testthat.R’ [85s/91s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(INDperform)
  > 
  > test_check("INDperform")
    variable required_data_type
  1      edf             double
  # 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
  # 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)[…
  ── 1. Error: (unknown) (@test_model_gamm.R#4)  ─────────────────────────────────
  No IND~pressure GAMM could be fitted! Check if you chose the correct error distribution (default is gaussian()).
  Backtrace:
   1. INDperform::model_gamm(init_tbl = ind_init_ex[test_id, ])
  
  # 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             double
    variable required_data_type
  1     pred               list
  ── 2. Error: (unknown) (@test_scoring.R#15)  ───────────────────────────────────
  Assigned data `"x < 0.3"` must be compatible with existing data.
  ℹ Error occurred for column `condition`.
  ✖ No common type for `value` <character> and `x` <list>.
  Backtrace:
   1. base::`[<-`(`*tmp*`, 4, "condition", value = "x < 0.3")
   2. tibble:::`[<-.tbl_df`(`*tmp*`, 4, "condition", value = "x < 0.3")
   3. tibble:::tbl_subassign(x, i, j, value, i_arg, j_arg, substitute(value))
   4. tibble:::tbl_subassign_row(xj, i, value, value_arg)
   5. base::tryCatch(...)
   6. base:::tryCatchList(expr, classes, parentenv, handlers)
   7. base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   8. value[[3L]](cond)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 544 | SKIPPED: 0 | WARNINGS: 8 | FAILED: 2 ]
  1. Error: (unknown) (@test_model_gamm.R#4) 
  2. Error: (unknown) (@test_scoring.R#15) 
  
  Error: testthat unit tests failed
  Execution halted