Skip to content

Commit 44eb2dd

Browse files
committed
R CMD check workaround
1 parent 27adfd6 commit 44eb2dd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/testthat/test-ggplot-contour.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ context("Contour")
55
test_that("geom_contour is translated to a path", {
66
skip_if_not_installed("reshape2")
77

8-
volcano3d <- reshape2::melt(volcano)
8+
volcano3d <- getFromNamespace("melt", "reshape2")(volcano)
99
names(volcano3d) <- c("x", "y", "z")
1010
# Draw a contour plot using geom_contour
1111
gg <- ggplot(volcano3d) + geom_contour(aes(x=x, y=y, z=z))

tests/testthat/test-ggplot-heatmap.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ workweek <- matrix(
1111
test_that("geom_tile is translated to type=heatmap", {
1212
skip_if_not_installed("reshape2")
1313

14-
ww <- reshape2::melt(workweek)
14+
ww <- getFromNamespace("melt", "reshape2")(workweek)
1515
ww$day <- factor(ww$day, wdays)
1616
ww$time <- factor(ww$time, dtimes)
1717
# Plot a heatmap using geom_tile

tests/testthat/test-ggplot-ticks.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ test_that("R line breaks are translated to HTML line breaks", {
183183
)
184184
p <- ggplot(aes(x = x, y = y), data = df_x) +
185185
geom_bar(stat = "identity") +
186-
scale_x_discrete(labels = function(x) stringr::str_wrap(x, width = 10))
186+
scale_x_discrete(labels = function(x) getFromNamespace("str_wrap", "stringr")(x, width = 10))
187187
info <- expect_traces(p, 1, "line-breaks")
188188
expect_length(
189189
strsplit(info$layout$xaxis$ticktext, "<br />", fixed = T)[[1]], 5

0 commit comments

Comments
 (0)