Skip to content

Commit

Permalink
fixing imports and namespace issues for raster and prettymapr
Browse files Browse the repository at this point in the history
  • Loading branch information
fawda123 committed Oct 26, 2023
1 parent 8f464eb commit ed8017f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: MassWateR
Title: Quality Control and Analysis of Massachusetts Water Quality Data
Version: 2.1.2
Version: 2.1.3
Authors@R: c(
person(given = "Marcus",
family = "Beck",
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export(utilMWRvaluerange)
export(utilMWRyscale)
import(RColorBrewer)
import(dplyr)
import(prettymapr)
import(tidyr)
importFrom(grDevices,dev.off)
importFrom(grDevices,png)
Expand Down
6 changes: 6 additions & 0 deletions R/anlzMWRmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#' @param runchk logical to run data checks with \code{\link{checkMWRresults}}, \code{\link{checkMWRacc}}, or \code{\link{checkMWRsites}}, applies only if \code{res}, \code{acc}, or \code{sit} are file paths
#' @param warn logical to return warnings to the console (default)
#'
#' @import prettymapr
#'
#' @return A \code{\link[ggplot2]{ggplot}} object that can be further modified.
#' @export
#'
Expand Down Expand Up @@ -156,6 +158,10 @@ anlzMWRmap<- function(res = NULL, param, acc = NULL, sit = NULL, fset = NULL, si

maptype <- match.arg(maptype, c( 'cartolight', 'cartodark', 'osm', 'hotstyle'))

# this is only to satisfy raster in imports, does nothing
# do not import all of raster becaus of namespace conflicts
tmp <- raster::as.data.frame(x = NULL)

m <- m +
ggspatial::annotation_map_tile(zoom = zoom, quiet = TRUE, progress = "none", type = maptype, cachedir = system.file("rosm.cache", package = "ggspatial"))

Expand Down

0 comments on commit ed8017f

Please sign in to comment.