diff --git a/pkg/caret/tests/testthat/test_Dummies.R b/pkg/caret/tests/testthat/test_Dummies.R index fe0b21c4..81535a6a 100644 --- a/pkg/caret/tests/testthat/test_Dummies.R +++ b/pkg/caret/tests/testthat/test_Dummies.R @@ -108,9 +108,9 @@ check_dummies <- function(x, expected = NULL) { expect_equal(exp_names, res_names) foosbarsbars <- dummies <- dummyVars(formula = id ~., - data = test_data, - sep = '-', - levelsOnly = TRUE) + data = test_data, + sep = '-', + levelsOnly = TRUE) exp_names_lvls <- paste(1:9) res_names_lvls <- colnames(predict(foosbarsbars, test_data)) @@ -120,6 +120,7 @@ check_dummies <- function(x, expected = NULL) { test_that("Good names for dummies with reocurring patterns", { + set.seed(1) # 200 all but guarantees (99.999% chance) 1:15 all represented, #1350 data = data.frame( matrix(