Skip to content

Commit 67c8f12

Browse files
committed
replace forcats code with base R
1 parent 57f6f9b commit 67c8f12

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/testthat/test-plotly.R

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,6 @@ test_that("toWebGL() shouldn't complain if it's already webgl", {
319319
})
320320

321321
test_that("Line breaks are properly translated (R -> HTML)", {
322-
skip_if_not_installed(pkg = "forcats")
323-
324322
# create target labels
325323
suffix <- "\n\n(third line)\n(fourth line)"
326324

@@ -333,9 +331,8 @@ test_that("Line breaks are properly translated (R -> HTML)", {
333331
fixed = TRUE)
334332

335333
# test factor column
336-
d <- iris %>% dplyr::mutate(Species = forcats::fct_relabel(Species,
337-
paste0,
338-
suffix))
334+
d <- iris
335+
levels(d$Species) <- paste0(levels(d$Species), suffix)
339336
p1 <- d %>% plot_ly(x = ~Sepal.Length,
340337
y = ~Species)
341338

0 commit comments

Comments
 (0)