tests/testthat/test-customParams.R

test_that("customParams works", {
   # Standard parameters for random forest
   methParam <- customParams() # or

   ### An error will be generated when there is a mismatch between method and rfMethod
   expect_error(methParam <- customParams(method='PLS',
                                          rfMethod = "ranger"))

   ### An error will be generated when the method is not specified correctly as RF
   expect_error(methParam <- customParams(method='ranger',
                                          rfMethod = "ranger"))

   ### An error will be generated when the method and rfMethod are misplaced
   expect_error(methParam <- customParams(method='randomForest',
                                          rfMethod = "RF"))



})

Try the MUVR2 package in your browser

Any scripts or data that you put into this service are public.

MUVR2 documentation built on Sept. 16, 2024, 9:06 a.m.