Skip to contents

Test combinations of argument values of a function.

Usage

arg_test(
  fun,
  arg,
  val,
  expect_error = NULL,
  parall = FALSE,
  thread_nb = NULL,
  print_count = 10,
  plot_fun = FALSE,
  export = FALSE,
  res_path = ".",
  safer_check = TRUE,
  lib_path = NULL,
  error_text = ""
)

Arguments

fun

Single character string indicating the name of the function tested (without brackets).

arg

Vector of character strings of arguments of fun. At least arguments that do not have default values must be present in this vector.

val

List with number of compartments equal to the length of arg, each compartment containing values of the corresponding argument in arg. Each different value must be in a list or in a vector. For instance, argument 3 in arg is a logical argument (values accepted TRUE, FALSE, NA). Thus, compartment 3 of val can be either list(TRUE, FALSE, NA), or c(TRUE, FALSE, NA). NULL value alone must be written list(NULL).

expect_error

List of exactly the same structure as val argument, but containing FALSE or TRUE, depending on whether error is expected (TRUE) or not (FALSE) for each corresponding value of val. A message is returned depending on discrepancies between the expected and observed errors. See the examples below. BEWARE: not always possible to write the expected errors for all the combination of argument values. Ignored if NULL.

parall

Single logical value. Force parallelization ?

thread_nb

Single numeric integer indicating the number of threads to use if ever parallelization is required. If NULL, all the available threads will be used. Ignored if parall is FALSE.

print_count

Single interger value. Print a working progress message every print_count during loops. BEWARE: can increase substentially the time to complete the process if using a small integer value, like 10 for instance. Use Inf if no loop message desired.

plot_fun

Single logical value. Plot the plotting function tested for each test? Ignored if the tested function is not a graphic function.

export

Single logical value. Export the results into a .RData file and into a .tsv file? If FALSE, return a list into the console (see below). BEWARE: will be automatically set to TRUE if parall is TRUE. This means that when using parallelization, the results are systematically exported, not returned into the console.

res_path

Single character string indicating the absolute pathway of the folder where the txt results and pdfs, containing all the plots, will be saved (by default into the working directory). Several txt and pdf, one per thread, if parallelization. Ignored if export is FALSE. Must be specified if parall is TRUE or if export is TRUE.

safer_check

Single logical value. Perform some "safer" checks? If TRUE, checkings are performed before main code running (see https://github.com/safer-r): 1) correct lib_path argument value 2) required functions and related packages effectively present in local R lybraries and 3) R classical operators (like "<-") not overwritten by another package because of the R scope. Must be set to FALSE if this fonction is used inside another "safer" function to avoid pointless multiple checkings.

lib_path

Vector of characters specifying the absolute pathways of the directories containing the required packages for the function, if not in the default directories. Useful when R package are not installed in the default directories because of lack of admin rights. More precisely, lib_path is passed through the new argument of .libPaths() so that the new library paths are unique(c(new, .Library.site, .Library)). Warning: .libPaths() is restored to the initial paths, after function execution. Ignored if NULL (default) or if the safer_check argument is FALSE: only the pathways specified by the current .libPaths() are used for package calling.

error_text

Single character string used to add information in error messages returned by the function, notably if the function is inside other functions, which is practical for debugging. Example: error_text = " INSIDE <PACKAGE_1>::<FUNCTION_1> INSIDE <PACKAGE_2>::<FUNCTION_2>.". If NULL, converted into "".

Value

One or several pdf if a plotting function is tested and if the plot_fun argument is TRUE.

And then, if export is FALSE a list containing:

- $fun: the tested function.

- $ini: the initial input values.

- $data: a data frame of all the combination tested, containing the following columns:

# the different values tested, named by arguments - $kind: a vector of character strings indicating the kind of test result: either "ERROR", or "WARNING", or "OK". - $problem: a logical vector indicating if error or not.

- $expected.error: optional logical vector indicating the expected error specified in the expect_error argument. - $message: either NULL if $kind is always "OK", or the messages.

- $sys.info: system and packages info.

If export is TRUE:

- the same list object into a .RData file.

- also the $data data frame into a .tsv file.

- if expect_error is non NULL and if any discrepancy, the $data data frame into a .tsv file but containing only the rows with discrepancies between expected and observed errors.

Details

Limited to 43 arguments with at least 2 values each. The total number of arguments tested can be more if the additional arguments have a single value. The limit is due to nested "for" loops (https://stat.ethz.ch/pipermail/r-help/2008-March/157341.html), but this limitation is away from the number of tests performed that would be 2^43.

See also

Examples

arg_test(fun = "unique", arg = c("x", "incomparables"), 
val = list(x = list(1:10, c(1,1,2,8), NA), incomparable = c(TRUE, FALSE, NA)))
#> 
#> test JOB IGNITION
#> 
#> TOTAL NUMBER OF TESTS: 9
#> 
#> LOOP PROCESS ENDED | LOOP 9 / 9 | TIME SPENT: 0S
#> 
#> test JOB END
#> 
#> TIME: 2025-06-23 07:46:12.40959
#> 
#> TOTAL TIME LAPSE: 0S
#> 
#> 
#> $fun
#> [1] "unique"
#> 
#> $ini
#> arg_test(fun = "unique", arg = c("x", "incomparables"), val = list(x = list(1:10, 
#>     c(1, 1, 2, 8), NA), incomparable = c(TRUE, FALSE, NA)))
#> 
#> $data
#>            X.SPECIAL.VALUE.OF.CLASS.integer.AND.TYPE.integer.
#> arg_test_1    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_2    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_3    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_4     SPECIAL VALUE OF CLASS numeric AND TYPE double
#> arg_test_5     SPECIAL VALUE OF CLASS numeric AND TYPE double
#> arg_test_6     SPECIAL VALUE OF CLASS numeric AND TYPE double
#> arg_test_7    SPECIAL VALUE OF CLASS logical AND TYPE logical
#> arg_test_8    SPECIAL VALUE OF CLASS logical AND TYPE logical
#> arg_test_9    SPECIAL VALUE OF CLASS logical AND TYPE logical
#>            X.SPECIAL.VALUE.OF.CLASS.logical.AND.TYPE.logical. kind problem
#> arg_test_1    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_2    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_3    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_4    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_5    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_6    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_7    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_8    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_9    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#>            message
#> arg_test_1        
#> arg_test_2        
#> arg_test_3        
#> arg_test_4        
#> arg_test_5        
#> arg_test_6        
#> arg_test_7        
#> arg_test_8        
#> arg_test_9        
#> 
#> $sys.info
#> R version 4.3.3 (2024-02-29)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 22.04.4 LTS
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> time zone: UTC
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] saferDev_1.0
#> 
#> loaded via a namespace (and not attached):
#>  [1] R6_2.5.1           Rcpp_1.0.12        askpass_1.2.0      brio_1.1.4        
#>  [5] bslib_0.7.0        cachem_1.0.8       cli_3.6.2          colorspace_2.1-0  
#>  [9] compiler_4.3.3     curl_5.2.1         desc_1.4.3         digest_0.6.35     
#> [13] downlit_0.4.3      evaluate_0.23      fansi_1.0.6        fastmap_1.1.1     
#> [17] fs_1.6.3           generics_0.1.3     ggplot2_3.5.0      glue_1.7.0        
#> [21] grid_4.3.3         gtable_0.3.5       htmltools_0.5.8.1  htmlwidgets_1.6.4 
#> [25] httr_1.4.7         jquerylib_0.1.4    jsonlite_1.8.8     knitr_1.46        
#> [29] lifecycle_1.0.4    lubridate_1.9.3    magrittr_2.0.3     memoise_2.0.1     
#> [33] munsell_0.5.1      parallel_4.3.3     pillar_1.9.0       pkgconfig_2.0.3   
#> [37] pkgdown_2.0.9      purrr_1.0.2        qpdf_1.3.3         ragg_1.3.0        
#> [41] remotes_2.5.0.9000 rlang_1.1.3        rmarkdown_2.26     rstudioapi_0.16.0 
#> [45] sass_0.4.9         scales_1.3.0       systemfonts_1.0.6  testthat_3.2.1.1  
#> [49] textshaping_0.3.7  tibble_3.2.1       timechange_0.3.0   tools_4.3.3       
#> [53] utf8_1.2.4         vctrs_0.6.5        whisker_0.4.1      withr_3.0.0       
#> [57] xfun_0.43          xml2_1.3.6         yaml_2.3.8        
#> 

arg_test(fun = "unique", arg = c("x", "incomparables"), 
val = list(x = list(1:10, c(1,1,2,8), NA), 
incomparable = c(TRUE, FALSE, NA)), expect_error = list(x = list(FALSE, FALSE, TRUE), 
incomparable = c(FALSE, FALSE, TRUE)))
#> 
#> test JOB IGNITION
#> 
#> TOTAL NUMBER OF TESTS: 9
#> 
#> LOOP PROCESS ENDED | LOOP 9 / 9 | TIME SPENT: 0S
#> 
#> DISCREPANCIES BETWEEN EXPECTED AND OBSERVED ERRORS (SEE THE $data RESULT)
#> 
#> test JOB END
#> 
#> TIME: 2025-06-23 07:46:12.651103
#> 
#> TOTAL TIME LAPSE: 0S
#> 
#> 
#> $fun
#> [1] "unique"
#> 
#> $ini
#> arg_test(fun = "unique", arg = c("x", "incomparables"), val = list(x = list(1:10, 
#>     c(1, 1, 2, 8), NA), incomparable = c(TRUE, FALSE, NA)), expect_error = list(x = list(FALSE, 
#>     FALSE, TRUE), incomparable = c(FALSE, FALSE, TRUE)))
#> 
#> $data
#>            X.SPECIAL.VALUE.OF.CLASS.integer.AND.TYPE.integer.
#> arg_test_1    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_2    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_3    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_4     SPECIAL VALUE OF CLASS numeric AND TYPE double
#> arg_test_5     SPECIAL VALUE OF CLASS numeric AND TYPE double
#> arg_test_6     SPECIAL VALUE OF CLASS numeric AND TYPE double
#> arg_test_7    SPECIAL VALUE OF CLASS logical AND TYPE logical
#> arg_test_8    SPECIAL VALUE OF CLASS logical AND TYPE logical
#> arg_test_9    SPECIAL VALUE OF CLASS logical AND TYPE logical
#>            X.SPECIAL.VALUE.OF.CLASS.logical.AND.TYPE.logical. kind problem
#> arg_test_1    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_2    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_3    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_4    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_5    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_6    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_7    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_8    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#> arg_test_9    SPECIAL VALUE OF CLASS logical AND TYPE logical   OK   FALSE
#>            expected.error message
#> arg_test_1          FALSE        
#> arg_test_2          FALSE        
#> arg_test_3           TRUE        
#> arg_test_4          FALSE        
#> arg_test_5          FALSE        
#> arg_test_6           TRUE        
#> arg_test_7           TRUE        
#> arg_test_8           TRUE        
#> arg_test_9           TRUE        
#> 
#> $sys.info
#> R version 4.3.3 (2024-02-29)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 22.04.4 LTS
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> time zone: UTC
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] saferDev_1.0
#> 
#> loaded via a namespace (and not attached):
#>  [1] R6_2.5.1           Rcpp_1.0.12        askpass_1.2.0      brio_1.1.4        
#>  [5] bslib_0.7.0        cachem_1.0.8       cli_3.6.2          colorspace_2.1-0  
#>  [9] compiler_4.3.3     curl_5.2.1         desc_1.4.3         digest_0.6.35     
#> [13] downlit_0.4.3      evaluate_0.23      fansi_1.0.6        fastmap_1.1.1     
#> [17] fs_1.6.3           generics_0.1.3     ggplot2_3.5.0      glue_1.7.0        
#> [21] grid_4.3.3         gtable_0.3.5       htmltools_0.5.8.1  htmlwidgets_1.6.4 
#> [25] httr_1.4.7         jquerylib_0.1.4    jsonlite_1.8.8     knitr_1.46        
#> [29] lifecycle_1.0.4    lubridate_1.9.3    magrittr_2.0.3     memoise_2.0.1     
#> [33] munsell_0.5.1      parallel_4.3.3     pillar_1.9.0       pkgconfig_2.0.3   
#> [37] pkgdown_2.0.9      purrr_1.0.2        qpdf_1.3.3         ragg_1.3.0        
#> [41] remotes_2.5.0.9000 rlang_1.1.3        rmarkdown_2.26     rstudioapi_0.16.0 
#> [45] sass_0.4.9         scales_1.3.0       systemfonts_1.0.6  testthat_3.2.1.1  
#> [49] textshaping_0.3.7  tibble_3.2.1       timechange_0.3.0   tools_4.3.3       
#> [53] utf8_1.2.4         vctrs_0.6.5        whisker_0.4.1      withr_3.0.0       
#> [57] xfun_0.43          xml2_1.3.6         yaml_2.3.8        
#> 

arg_test(fun = "unique", arg = c("x", "incomparables"), 
val = list(x = list(1:10, c(1,1,2,8), NA), incomparable = c(TRUE, FALSE, NA)), 
expect_error = list(x = c(FALSE, FALSE, TRUE), incomparable = c(FALSE, FALSE, TRUE)), 
export = TRUE, res_path = getwd())
#> 
#> test JOB IGNITION
#> 
#> TOTAL NUMBER OF TESTS: 9
#> 
#> LOOP PROCESS ENDED | LOOP 9 / 9 | TIME SPENT: 0S
#> 
#> DISCREPANCIES BETWEEN EXPECTED AND OBSERVED ERRORS (SEE THE discrepancy_table_from_arg_test_1-9.tsv FILE)
#> 
#> test JOB END
#> 
#> TIME: 2025-06-23 07:46:12.895612
#> 
#> TOTAL TIME LAPSE: 0S
#> 
#> 

if (FALSE)  # Example that return an error
arg_test(fun = "unique", arg = c("x", "incomparables"), val = list(A = list(x = list(1:10, c(1,1,2,8), NA), incomparable = c(TRUE, FALSE, NA))))
arg_test(fun = "round", arg = c("data", "dec.nb", "after.lead.zero"), val = list(L1 = list(c(1, 1.0002256, 1.23568), "a", NA), L2 = list(2, c(1,3), NA), L3 = c(TRUE, FALSE, NA)))
#> Error: 
#> 
#> ================
#> 
#> ERROR IN saferDev::arg_test().
#> 
#> SOME OF THE STRINGS IN arg ARE NOT ARGUMENTS OF fun.
#> fun ARGUMENTS:
#> 
#> PROBLEMATIC STRINGS IN arg:
#> data dec.nb after.lead.zero
#> 
#> ================
#> 


arg_test(fun = "plot", arg = c("x", "y"), val = list(x = list(1:10, 12:13, NA, (1:10)^2), 
y = list(1:10, NA, NA)),  expect_error = list(x = list(FALSE, TRUE, TRUE, FALSE), 
y = list(FALSE, TRUE, TRUE)), parall = FALSE, thread_nb = NULL, plot_fun = TRUE, 
res_path = ".", lib_path = NULL)
#> 
#> test JOB IGNITION
#> 
#> TOTAL NUMBER OF TESTS: 12
#> 
#> LOOP 10 / 12 | TIME SPENT: 0S | EXPECTED END: 2025-06-23 07:46:13.269179
#> LOOP PROCESS ENDED | LOOP 12 / 12 | TIME SPENT: 0S
#> 
#> NO DISCREPANCY BETWEEN EXPECTED AND OBSERVED ERRORS
#> 
#> test JOB END
#> 
#> TIME: 2025-06-23 07:46:13.285496
#> 
#> TOTAL TIME LAPSE: 0S
#> 
#> 
#> $fun
#> [1] "plot"
#> 
#> $ini
#> arg_test(fun = "plot", arg = c("x", "y"), val = list(x = list(1:10, 
#>     12:13, NA, (1:10)^2), y = list(1:10, NA, NA)), expect_error = list(x = list(FALSE, 
#>     TRUE, TRUE, FALSE), y = list(FALSE, TRUE, TRUE)), parall = FALSE, 
#>     thread_nb = NULL, plot_fun = TRUE, res_path = ".", lib_path = NULL)
#> 
#> $data
#>             X.SPECIAL.VALUE.OF.CLASS.integer.AND.TYPE.integer.
#> arg_test_01    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_02    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_03    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_04    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_05    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_06    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_07    SPECIAL VALUE OF CLASS logical AND TYPE logical
#> arg_test_08    SPECIAL VALUE OF CLASS logical AND TYPE logical
#> arg_test_09    SPECIAL VALUE OF CLASS logical AND TYPE logical
#> arg_test_10     SPECIAL VALUE OF CLASS numeric AND TYPE double
#> arg_test_11     SPECIAL VALUE OF CLASS numeric AND TYPE double
#> arg_test_12     SPECIAL VALUE OF CLASS numeric AND TYPE double
#>             X.SPECIAL.VALUE.OF.CLASS.integer.AND.TYPE.integer..1  kind problem
#> arg_test_01      SPECIAL VALUE OF CLASS integer AND TYPE integer    OK   FALSE
#> arg_test_02      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_03      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_04      SPECIAL VALUE OF CLASS integer AND TYPE integer ERROR    TRUE
#> arg_test_05      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_06      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_07      SPECIAL VALUE OF CLASS integer AND TYPE integer ERROR    TRUE
#> arg_test_08      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_09      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_10      SPECIAL VALUE OF CLASS integer AND TYPE integer    OK   FALSE
#> arg_test_11      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_12      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#>             expected.error
#> arg_test_01          FALSE
#> arg_test_02           TRUE
#> arg_test_03           TRUE
#> arg_test_04           TRUE
#> arg_test_05           TRUE
#> arg_test_06           TRUE
#> arg_test_07           TRUE
#> arg_test_08           TRUE
#> arg_test_09           TRUE
#> arg_test_10          FALSE
#> arg_test_11           TRUE
#> arg_test_12           TRUE
#>                                                                                      message
#> arg_test_01                                                                                 
#> arg_test_02 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_03 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_04 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_05 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_06 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_07 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_08                          Error in plot.window(...) : need finite 'xlim' values\n
#> arg_test_09                          Error in plot.window(...) : need finite 'xlim' values\n
#> arg_test_10                                                                                 
#> arg_test_11 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_12 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> 
#> $sys.info
#> R version 4.3.3 (2024-02-29)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 22.04.4 LTS
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> time zone: UTC
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] saferDev_1.0
#> 
#> loaded via a namespace (and not attached):
#>  [1] R6_2.5.1           Rcpp_1.0.12        askpass_1.2.0      brio_1.1.4        
#>  [5] bslib_0.7.0        cachem_1.0.8       cli_3.6.2          colorspace_2.1-0  
#>  [9] compiler_4.3.3     curl_5.2.1         desc_1.4.3         digest_0.6.35     
#> [13] downlit_0.4.3      evaluate_0.23      fansi_1.0.6        fastmap_1.1.1     
#> [17] fs_1.6.3           generics_0.1.3     ggplot2_3.5.0      glue_1.7.0        
#> [21] grid_4.3.3         gtable_0.3.5       htmltools_0.5.8.1  htmlwidgets_1.6.4 
#> [25] httr_1.4.7         jquerylib_0.1.4    jsonlite_1.8.8     knitr_1.46        
#> [29] lifecycle_1.0.4    lubridate_1.9.3    magrittr_2.0.3     memoise_2.0.1     
#> [33] munsell_0.5.1      parallel_4.3.3     pillar_1.9.0       pkgconfig_2.0.3   
#> [37] pkgdown_2.0.9      purrr_1.0.2        qpdf_1.3.3         ragg_1.3.0        
#> [41] remotes_2.5.0.9000 rlang_1.1.3        rmarkdown_2.26     rstudioapi_0.16.0 
#> [45] sass_0.4.9         scales_1.3.0       systemfonts_1.0.6  testthat_3.2.1.1  
#> [49] textshaping_0.3.7  tibble_3.2.1       timechange_0.3.0   tools_4.3.3       
#> [53] utf8_1.2.4         vctrs_0.6.5        whisker_0.4.1      withr_3.0.0       
#> [57] xfun_0.43          xml2_1.3.6         yaml_2.3.8        
#> 

arg_test(fun = "plot", arg = c("x", "y"), val = list(x = list(1:10, 12:13, NA, (1:10)^2), 
y = list(1:10, NA, NA)), parall = FALSE, thread_nb = 4, 
plot_fun = TRUE, res_path = ".", 
lib_path = NULL)
#> 
#> test JOB IGNITION
#> 
#> TOTAL NUMBER OF TESTS: 12
#> 
#> LOOP 10 / 12 | TIME SPENT: 0S | EXPECTED END: 2025-06-23 07:46:13.574541
#> LOOP PROCESS ENDED | LOOP 12 / 12 | TIME SPENT: 0S
#> 
#> test JOB END
#> 
#> TIME: 2025-06-23 07:46:13.58497
#> 
#> TOTAL TIME LAPSE: 0S
#> 
#> 
#> $fun
#> [1] "plot"
#> 
#> $ini
#> arg_test(fun = "plot", arg = c("x", "y"), val = list(x = list(1:10, 
#>     12:13, NA, (1:10)^2), y = list(1:10, NA, NA)), parall = FALSE, 
#>     thread_nb = 4, plot_fun = TRUE, res_path = ".", lib_path = NULL)
#> 
#> $data
#>             X.SPECIAL.VALUE.OF.CLASS.integer.AND.TYPE.integer.
#> arg_test_01    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_02    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_03    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_04    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_05    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_06    SPECIAL VALUE OF CLASS integer AND TYPE integer
#> arg_test_07    SPECIAL VALUE OF CLASS logical AND TYPE logical
#> arg_test_08    SPECIAL VALUE OF CLASS logical AND TYPE logical
#> arg_test_09    SPECIAL VALUE OF CLASS logical AND TYPE logical
#> arg_test_10     SPECIAL VALUE OF CLASS numeric AND TYPE double
#> arg_test_11     SPECIAL VALUE OF CLASS numeric AND TYPE double
#> arg_test_12     SPECIAL VALUE OF CLASS numeric AND TYPE double
#>             X.SPECIAL.VALUE.OF.CLASS.integer.AND.TYPE.integer..1  kind problem
#> arg_test_01      SPECIAL VALUE OF CLASS integer AND TYPE integer    OK   FALSE
#> arg_test_02      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_03      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_04      SPECIAL VALUE OF CLASS integer AND TYPE integer ERROR    TRUE
#> arg_test_05      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_06      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_07      SPECIAL VALUE OF CLASS integer AND TYPE integer ERROR    TRUE
#> arg_test_08      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_09      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_10      SPECIAL VALUE OF CLASS integer AND TYPE integer    OK   FALSE
#> arg_test_11      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#> arg_test_12      SPECIAL VALUE OF CLASS logical AND TYPE logical ERROR    TRUE
#>                                                                                      message
#> arg_test_01                                                                                 
#> arg_test_02 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_03 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_04 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_05 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_06 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_07 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_08                          Error in plot.window(...) : need finite 'xlim' values\n
#> arg_test_09                          Error in plot.window(...) : need finite 'xlim' values\n
#> arg_test_10                                                                                 
#> arg_test_11 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> arg_test_12 Error in xy.coords(x, y, xlabel, ylabel, log) : \n  'x' and 'y' lengths differ\n
#> 
#> $sys.info
#> R version 4.3.3 (2024-02-29)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 22.04.4 LTS
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> time zone: UTC
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] saferDev_1.0
#> 
#> loaded via a namespace (and not attached):
#>  [1] R6_2.5.1           Rcpp_1.0.12        askpass_1.2.0      brio_1.1.4        
#>  [5] bslib_0.7.0        cachem_1.0.8       cli_3.6.2          colorspace_2.1-0  
#>  [9] compiler_4.3.3     curl_5.2.1         desc_1.4.3         digest_0.6.35     
#> [13] downlit_0.4.3      evaluate_0.23      fansi_1.0.6        fastmap_1.1.1     
#> [17] fs_1.6.3           generics_0.1.3     ggplot2_3.5.0      glue_1.7.0        
#> [21] grid_4.3.3         gtable_0.3.5       htmltools_0.5.8.1  htmlwidgets_1.6.4 
#> [25] httr_1.4.7         jquerylib_0.1.4    jsonlite_1.8.8     knitr_1.46        
#> [29] lifecycle_1.0.4    lubridate_1.9.3    magrittr_2.0.3     memoise_2.0.1     
#> [33] munsell_0.5.1      parallel_4.3.3     pillar_1.9.0       pkgconfig_2.0.3   
#> [37] pkgdown_2.0.9      purrr_1.0.2        qpdf_1.3.3         ragg_1.3.0        
#> [41] remotes_2.5.0.9000 rlang_1.1.3        rmarkdown_2.26     rstudioapi_0.16.0 
#> [45] sass_0.4.9         scales_1.3.0       systemfonts_1.0.6  testthat_3.2.1.1  
#> [49] textshaping_0.3.7  tibble_3.2.1       timechange_0.3.0   tools_4.3.3       
#> [53] utf8_1.2.4         vctrs_0.6.5        whisker_0.4.1      withr_3.0.0       
#> [57] xfun_0.43          xml2_1.3.6         yaml_2.3.8        
#>