diff --git a/DESCRIPTION b/DESCRIPTION index 6f236da3ad..be477e0a60 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -65,14 +65,13 @@ Suggests: webshot, listviewer, dendextend, - maptools, - rgeos, sf, png, IRdisplay, processx, plotlyGeoAssets, forcats, + withr, palmerpenguins, rversions, reticulate, diff --git a/man/reexports.Rd b/man/reexports.Rd index 67f762b2b0..6b74bd0ff6 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -35,7 +35,7 @@ These objects are imported from other packages. Follow the links below to see their documentation. \describe{ - \item{dplyr}{\code{\link[dplyr]{arrange}}, \code{\link[dplyr:se-deprecated]{arrange_}}, \code{\link[dplyr]{distinct}}, \code{\link[dplyr:se-deprecated]{distinct_}}, \code{\link[dplyr]{do}}, \code{\link[dplyr:se-deprecated]{do_}}, \code{\link[dplyr]{filter}}, \code{\link[dplyr:se-deprecated]{filter_}}, \code{\link[dplyr]{group_by}}, \code{\link[dplyr:se-deprecated]{group_by_}}, \code{\link[dplyr:group_data]{groups}}, \code{\link[dplyr]{mutate}}, \code{\link[dplyr:se-deprecated]{mutate_}}, \code{\link[dplyr]{rename}}, \code{\link[dplyr:se-deprecated]{rename_}}, \code{\link[dplyr]{select}}, \code{\link[dplyr:se-deprecated]{select_}}, \code{\link[dplyr]{slice}}, \code{\link[dplyr:se-deprecated]{slice_}}, \code{\link[dplyr]{summarise}}, \code{\link[dplyr:se-deprecated]{summarise_}}, \code{\link[dplyr:mutate]{transmute}}, \code{\link[dplyr:se-deprecated]{transmute_}}, \code{\link[dplyr:group_by]{ungroup}}} + \item{dplyr}{\code{\link[dplyr]{arrange}}, \code{\link[dplyr:se-deprecated]{arrange_}}, \code{\link[dplyr]{distinct}}, \code{\link[dplyr:se-deprecated]{distinct_}}, \code{\link[dplyr]{do}}, \code{\link[dplyr:se-deprecated]{do_}}, \code{\link[dplyr]{filter}}, \code{\link[dplyr:se-deprecated]{filter_}}, \code{\link[dplyr]{group_by}}, \code{\link[dplyr:se-deprecated]{group_by_}}, \code{\link[dplyr:group_data]{groups}}, \code{\link[dplyr]{mutate}}, \code{\link[dplyr:se-deprecated]{mutate_}}, \code{\link[dplyr]{rename}}, \code{\link[dplyr:se-deprecated]{rename_}}, \code{\link[dplyr]{select}}, \code{\link[dplyr:se-deprecated]{select_}}, \code{\link[dplyr]{slice}}, \code{\link[dplyr:se-deprecated]{slice_}}, \code{\link[dplyr]{summarise}}, \code{\link[dplyr:se-deprecated]{summarise_}}, \code{\link[dplyr]{transmute}}, \code{\link[dplyr:se-deprecated]{transmute_}}, \code{\link[dplyr:group_by]{ungroup}}} \item{magrittr}{\code{\link[magrittr:pipe]{\%>\%}}} }} diff --git a/tests/testthat/test-animate-highlight.R b/tests/testthat/test-animate-highlight.R index 3ede5209de..824f51af99 100644 --- a/tests/testthat/test-animate-highlight.R +++ b/tests/testthat/test-animate-highlight.R @@ -436,6 +436,7 @@ test_that("animation button can be customized", { test_that("sf works with crosstalk", { skip_if_not_installed("sf") skip_if_not_installed("s2") + skip_if_not_installed("ggthemes") nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE) # shared data will make the polygons "query-able" diff --git a/tests/testthat/test-ggplot-date.R b/tests/testthat/test-ggplot-date.R index 494e936d2f..2bd7704b17 100644 --- a/tests/testthat/test-ggplot-date.R +++ b/tests/testthat/test-ggplot-date.R @@ -1,13 +1,14 @@ test_that("datetimes are converted to e.g. 2013-01-02 05:00:00", { + withr::local_locale(c("LC_TIME" = "en_US")) in.str <- c("17 Mar 1983 06:33:44 AM", - "17 Mar 1984 01:59:55 PM") + "17 Mar 1984 01:59:55 PM") time.obj <- strptime(in.str, "%d %b %Y %I:%M:%S %p") out.str <- strftime(time.obj, "%Y-%m-%d %H:%M:%S") df <- rbind(data.frame(who = "me", time.obj, dollars = c(1.1, 5.6)), data.frame(who = "you", time.obj, dollars = c(10.2, 0))) - gg <- qplot(time.obj, dollars, data = df, color = who, geom = "line") + gg <- ggplot(aes(time.obj, dollars, color = who), data = df) + geom_line() info <- expect_doppelganger_built(gg, "date-strings") expect_equivalent(length(info$data), 2) for(trace in info$data[1:2]){ diff --git a/tests/testthat/test-ggplot-hex.R b/tests/testthat/test-ggplot-hex.R index 01b9eaa154..a7aea74edc 100644 --- a/tests/testthat/test-ggplot-hex.R +++ b/tests/testthat/test-ggplot-hex.R @@ -1,6 +1,7 @@ d <- ggplot(diamonds, aes(carat, price)) test_that("geom_hex", { + skip_if_not_installed("hexbin") g <- d + geom_hex() l <- expect_doppelganger_built(g, "hex-basic") expect_true(length(l$data) > 1) @@ -8,12 +9,14 @@ test_that("geom_hex", { test_that("geom_hex with bins", { + skip_if_not_installed("hexbin") g <- d + geom_hex(bins = 10) l <- expect_doppelganger_built(g, "hex-bins") expect_true(length(l$data) > 1) }) test_that("geom_hex with binwidth", { + skip_if_not_installed("hexbin") g <- d + geom_hex(binwidth = c(1, 1000)) l <- expect_doppelganger_built(g, "hex-binwidth") expect_true(length(l$data) > 1) diff --git a/tests/testthat/test-ggplot-sf.R b/tests/testthat/test-ggplot-sf.R index 2d60ae09f2..6450c23689 100644 --- a/tests/testthat/test-ggplot-sf.R +++ b/tests/testthat/test-ggplot-sf.R @@ -90,6 +90,7 @@ test_that("sf aspect ratio is correct", { test_that("works with a blank theme", { skip_if_not_installed("sf") skip_if_not_installed("s2") + skip_if_not_installed("ggthemes") nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE) p <- ggplot(nc) + geom_sf() + diff --git a/tests/testthat/test-plotly-sf.R b/tests/testthat/test-plotly-sf.R index 2e44ce7964..8819432eee 100644 --- a/tests/testthat/test-plotly-sf.R +++ b/tests/testthat/test-plotly-sf.R @@ -96,8 +96,6 @@ test_that("Can plot sfc with a missing crs", { test_that("plot_ly() defaults to blank axes", { skip_if_not_installed("sf") - skip_if_not_installed("maptools") - skip_if_not_installed("rgeos") m <- sf::st_as_sf(maps::map("world", plot = FALSE, fill = TRUE))