1
0
Fork 0
mirror of https://github.com/sensebox/opensensmapr synced 2025-02-21 21:53:57 +01:00

add plot.sensebox() dependencies to suggests

fixes #15
This commit is contained in:
Norwin 2018-01-13 15:08:31 +01:00
parent 416d986c11
commit cd6f3c6fbb
Signed by: norwin
GPG key ID: 24BC059DE24C43A3
2 changed files with 4 additions and 2 deletions

View file

@ -9,7 +9,10 @@ Imports:
httr,
magrittr
Suggests:
maps,
maptools,
readr,
rgeos,
sf,
knitr,
rmarkdown

View file

@ -6,7 +6,7 @@ plot.sensebox = function (x, ..., mar = c(2,2,1,1)) {
!requireNamespace("maptools", 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 %>%
@ -15,7 +15,6 @@ plot.sensebox = function (x, ..., mar = c(2,2,1,1)) {
bbox = sf::st_bbox(geom)
library(maps)
world = maps::map('world', plot = FALSE, fill = TRUE) %>%
sf::st_as_sf() %>%
sf::st_geometry()