Skip to content

Commit 50c50ea

Browse files
authoredOct 5, 2023
Remove dependencies on maptools and rgeos (#2297)
1 parent 0469eab commit 50c50ea

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed
 

‎DESCRIPTION

+1-2
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,13 @@ Suggests:
6565
webshot,
6666
listviewer,
6767
dendextend,
68-
maptools,
69-
rgeos,
7068
sf,
7169
png,
7270
IRdisplay,
7371
processx,
7472
plotlyGeoAssets,
7573
forcats,
74+
withr,
7675
palmerpenguins,
7776
rversions,
7877
reticulate,

‎man/reexports.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tests/testthat/test-animate-highlight.R

+1
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ test_that("animation button can be customized", {
436436
test_that("sf works with crosstalk", {
437437
skip_if_not_installed("sf")
438438
skip_if_not_installed("s2")
439+
skip_if_not_installed("ggthemes")
439440

440441
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
441442
# shared data will make the polygons "query-able"

‎tests/testthat/test-ggplot-date.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11

22

33
test_that("datetimes are converted to e.g. 2013-01-02 05:00:00", {
4+
withr::local_locale(c("LC_TIME" = "en_US"))
45
in.str <- c("17 Mar 1983 06:33:44 AM",
5-
"17 Mar 1984 01:59:55 PM")
6+
"17 Mar 1984 01:59:55 PM")
67
time.obj <- strptime(in.str, "%d %b %Y %I:%M:%S %p")
78
out.str <- strftime(time.obj, "%Y-%m-%d %H:%M:%S")
89
df <- rbind(data.frame(who = "me", time.obj, dollars = c(1.1, 5.6)),
910
data.frame(who = "you", time.obj, dollars = c(10.2, 0)))
10-
gg <- qplot(time.obj, dollars, data = df, color = who, geom = "line")
11+
gg <- ggplot(aes(time.obj, dollars, color = who), data = df) + geom_line()
1112
info <- expect_doppelganger_built(gg, "date-strings")
1213
expect_equivalent(length(info$data), 2)
1314
for(trace in info$data[1:2]){

‎tests/testthat/test-ggplot-hex.R

+3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
d <- ggplot(diamonds, aes(carat, price))
22

33
test_that("geom_hex", {
4+
skip_if_not_installed("hexbin")
45
g <- d + geom_hex()
56
l <- expect_doppelganger_built(g, "hex-basic")
67
expect_true(length(l$data) > 1)
78
})
89

910

1011
test_that("geom_hex with bins", {
12+
skip_if_not_installed("hexbin")
1113
g <- d + geom_hex(bins = 10)
1214
l <- expect_doppelganger_built(g, "hex-bins")
1315
expect_true(length(l$data) > 1)
1416
})
1517

1618
test_that("geom_hex with binwidth", {
19+
skip_if_not_installed("hexbin")
1720
g <- d + geom_hex(binwidth = c(1, 1000))
1821
l <- expect_doppelganger_built(g, "hex-binwidth")
1922
expect_true(length(l$data) > 1)

‎tests/testthat/test-ggplot-sf.R

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ test_that("sf aspect ratio is correct", {
9090
test_that("works with a blank theme", {
9191
skip_if_not_installed("sf")
9292
skip_if_not_installed("s2")
93+
skip_if_not_installed("ggthemes")
9394

9495
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
9596
p <- ggplot(nc) + geom_sf() +

‎tests/testthat/test-plotly-sf.R

-2
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ test_that("Can plot sfc with a missing crs", {
9696

9797
test_that("plot_ly() defaults to blank axes", {
9898
skip_if_not_installed("sf")
99-
skip_if_not_installed("maptools")
100-
skip_if_not_installed("rgeos")
10199

102100
m <- sf::st_as_sf(maps::map("world", plot = FALSE, fill = TRUE))
103101

0 commit comments

Comments
 (0)