From 02bd797fc53f08b4203048f0fcc827c1eb0f716d Mon Sep 17 00:00:00 2001 From: fdetsch Date: Fri, 10 Jun 2022 09:01:49 +0200 Subject: [PATCH] eliminates {rworldmap} dependency (#12) --- DESCRIPTION | 1 - NAMESPACE | 1 - NEWS.md | 2 +- R/stationFromCoords.R | 4 ---- R/stationFromExtent.R | 6 ------ man/stationFromCoords.Rd | 4 ---- man/stationFromExtent.Rd | 4 ---- 7 files changed, 1 insertion(+), 21 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 68ab01d..3ea8227 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,7 +8,6 @@ License: MIT + file LICENSE Depends: R (>= 4.1) Imports: - rworldmap, gmt, zoo, Rssa, diff --git a/NAMESPACE b/NAMESPACE index dec1a81..32fdaa9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -32,7 +32,6 @@ importFrom(forecast,forecast) importFrom(gmt,geodist) importFrom(graphics,points) importFrom(reshape2,melt) -importFrom(rworldmap,mapGriddedData) importFrom(sf,st_as_sf) importFrom(zoo,as.yearmon) importFrom(zoo,read.zoo) diff --git a/NEWS.md b/NEWS.md index 40c293e..a85f801 100644 --- a/NEWS.md +++ b/NEWS.md @@ -8,7 +8,7 @@ #### 🍬 miscellaneous - * Eliminates {dplyr} dependency (#12) + * Eliminates {dplyr} and {rworldmap} dependencies (#12) # GSODTools 1.0.5 (2022-06-08) diff --git a/R/stationFromCoords.R b/R/stationFromCoords.R index 1da8f59..d21f40b 100644 --- a/R/stationFromCoords.R +++ b/R/stationFromCoords.R @@ -29,10 +29,6 @@ #' y = -3.065053, #' width = 100) #' -#' rworldmap::mapGriddedData(mapRegion = "africa", plotData = FALSE, borderCol = "black", -#' addLegend = FALSE) -#' points(sf::st_coordinates(gsod_shp), col = "red", pch = 20, cex = 2) -#' #' # Alternatively #' gsod_shp <- stationFromCoords(x = c(37.359031, -3.065053), #' width = 100) diff --git a/R/stationFromExtent.R b/R/stationFromExtent.R index 01a828d..ce8093f 100644 --- a/R/stationFromExtent.R +++ b/R/stationFromExtent.R @@ -23,12 +23,6 @@ #' kili <- sf::st_bbox(c(xmin = 37, xmax = 37.72, ymin = -3.4, ymax = -2.84)) #' gsod_shp_kili <- stationFromExtent(bb = kili) #' -#' rworldmap::mapGriddedData(mapRegion = "africa", plotData = FALSE, borderCol = "black", -#' addLegend = FALSE) -#' points(sf::st_coordinates(gsod_shp_kili), col = "red") -#' -#' @importFrom rworldmap mapGriddedData -#' #' @export stationFromExtent <- function(bb, ...) { diff --git a/man/stationFromCoords.Rd b/man/stationFromCoords.Rd index 7271f5f..f9a3f2a 100644 --- a/man/stationFromCoords.Rd +++ b/man/stationFromCoords.Rd @@ -33,10 +33,6 @@ gsod_shp <- stationFromCoords(x = 37.359031, y = -3.065053, width = 100) -rworldmap::mapGriddedData(mapRegion = "africa", plotData = FALSE, borderCol = "black", - addLegend = FALSE) -points(sf::st_coordinates(gsod_shp), col = "red", pch = 20, cex = 2) - # Alternatively gsod_shp <- stationFromCoords(x = c(37.359031, -3.065053), width = 100) diff --git a/man/stationFromExtent.Rd b/man/stationFromExtent.Rd index 17d1dc6..0fc9b75 100644 --- a/man/stationFromExtent.Rd +++ b/man/stationFromExtent.Rd @@ -25,10 +25,6 @@ given map extent. kili <- sf::st_bbox(c(xmin = 37, xmax = 37.72, ymin = -3.4, ymax = -2.84)) gsod_shp_kili <- stationFromExtent(bb = kili) -rworldmap::mapGriddedData(mapRegion = "africa", plotData = FALSE, borderCol = "black", - addLegend = FALSE) -points(sf::st_coordinates(gsod_shp_kili), col = "red") - } \seealso{ \code{\link[sf]{st_crop}}