From d73a1302e3ba5ca3e1c34520819b5893d7aaffc3 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Mon, 18 Jul 2022 01:12:38 -0700 Subject: [PATCH] set explicit stringsAsFactors to pass on R<4 --- inst/tinytest/test_exemplar.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inst/tinytest/test_exemplar.R b/inst/tinytest/test_exemplar.R index 3dbb093..c8fa45a 100644 --- a/inst/tinytest/test_exemplar.R +++ b/inst/tinytest/test_exemplar.R @@ -4,11 +4,12 @@ df1 <- data.frame( y = sample(letters[1L:3L], size = 100, replace = TRUE, prob = c(0.1, 0.1, 0.8)), z = sample(c(Sys.Date(), Sys.Date() + 1, Sys.Date() + 2), size = 100, - replace = TRUE, prob = c(0.1, 0.1, 0.8)) + replace = TRUE, prob = c(0.1, 0.1, 0.8)), + stringsAsFactors = FALSE ) # Data frame that pdp::exemplar() should return -df2 <- data.frame(x = 3L, y = "c", z = Sys.Date() + 2) +df2 <- data.frame(x = 3L, y = "c", z = Sys.Date() + 2, stringsAsFactors = FALSE) # Expectation(s) df3 <- exemplar(df1)