mirror of
https://github.com/sensebox/opensensmapr
synced 2025-02-22 14:53:57 +01:00
parent
416d986c11
commit
cd6f3c6fbb
2 changed files with 4 additions and 2 deletions
|
@ -9,7 +9,10 @@ Imports:
|
||||||
httr,
|
httr,
|
||||||
magrittr
|
magrittr
|
||||||
Suggests:
|
Suggests:
|
||||||
|
maps,
|
||||||
|
maptools,
|
||||||
readr,
|
readr,
|
||||||
|
rgeos,
|
||||||
sf,
|
sf,
|
||||||
knitr,
|
knitr,
|
||||||
rmarkdown
|
rmarkdown
|
||||||
|
|
|
@ -6,7 +6,7 @@ plot.sensebox = function (x, ..., mar = c(2,2,1,1)) {
|
||||||
!requireNamespace("maptools", quietly = TRUE) ||
|
!requireNamespace("maptools", quietly = TRUE) ||
|
||||||
!requireNamespace("rgeos", quietly = TRUE)
|
!requireNamespace("rgeos", quietly = TRUE)
|
||||||
) {
|
) {
|
||||||
stop('this functions requires the packages sf, maps, maptools, rgeos')
|
stop('this functions requires additional packages. install them with\n install.packages(c("sf", "maps", "maptools", "rgeos"))')
|
||||||
}
|
}
|
||||||
|
|
||||||
geom = x %>%
|
geom = x %>%
|
||||||
|
@ -15,7 +15,6 @@ plot.sensebox = function (x, ..., mar = c(2,2,1,1)) {
|
||||||
|
|
||||||
bbox = sf::st_bbox(geom)
|
bbox = sf::st_bbox(geom)
|
||||||
|
|
||||||
library(maps)
|
|
||||||
world = maps::map('world', plot = FALSE, fill = TRUE) %>%
|
world = maps::map('world', plot = FALSE, fill = TRUE) %>%
|
||||||
sf::st_as_sf() %>%
|
sf::st_as_sf() %>%
|
||||||
sf::st_geometry()
|
sf::st_geometry()
|
||||||
|
|
Loading…
Add table
Reference in a new issue