ropensci / osmplotr

Data visualisation using OpenStreetMap objects
https://docs.ropensci.org/osmplotr
135 stars 21 forks source link

still had to install the package sp #11

Closed mgehling closed 8 years ago

mgehling commented 8 years ago

dat_B <- extract_osm_objects (key='building', bbox=bbox) Loading required package: sp

install.packages ('sp')

mpadge commented 8 years ago

That's because osmar doesn't specify the dependency properly. osmar DESCRIPTION has

Suggests: sp (>= 0.9-93)

and it should be under Depends not Suggests because osmar::as-osmar-sp.R has:

as_osmar_bbox.Spatial <- function(obj, ...) { stopifnot(require("sp")) bb <- sp::bbox(obj)

That's a very unorthodox way to call a dependency. Annoying in osmplotr at present, but will be fixed when I replace osmar dependency with osmdatar. Until then, we'll have to live with it