From 63ae6441f696146b2633a428e61afbc891049c13 Mon Sep 17 00:00:00 2001 From: temospena Date: Tue, 17 Aug 2021 16:04:20 +0100 Subject: [PATCH] add `colorspace`to Imports. #32 --- DESCRIPTION | 4 ++-- R/plot_slope.R | 12 ++---------- man/plot_dz.Rd | 3 +-- man/plot_slope.Rd | 3 +-- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2157709..3516420 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -32,12 +32,12 @@ Imports: raster, methods, pbapply, - geodist + geodist, + colorspace Depends: R (>= 2.10) Suggests: terra, - colorspace, knitr, rmarkdown, ceramic, diff --git a/R/plot_slope.R b/R/plot_slope.R index 61801cc..f36ab52 100644 --- a/R/plot_slope.R +++ b/R/plot_slope.R @@ -14,11 +14,7 @@ plot_slope = function(routes, lonlat = sf::st_is_longlat(routes), fill = TRUE, horiz = FALSE, - p = ifelse( - test = requireNamespace("colorspace", quietly = TRUE), - colorspace::diverging_hcl, - grDevices::terrain.colors - ), + p = colorspace::diverging_hcl, ..., x = "top", col = "black", @@ -60,11 +56,7 @@ plot_dz = function(d, z, fill = TRUE, horiz = FALSE, - p = ifelse( - test = requireNamespace("colorspace", quietly = TRUE), - colorspace::diverging_hcl, - grDevices::terrain.colors - ), + p = colorspace::diverging_hcl, ..., x = "top", col = "black", diff --git a/man/plot_dz.Rd b/man/plot_dz.Rd index 5662b43..19f0848 100644 --- a/man/plot_dz.Rd +++ b/man/plot_dz.Rd @@ -9,8 +9,7 @@ plot_dz( z, fill = TRUE, horiz = FALSE, - p = ifelse(test = requireNamespace("colorspace", quietly = TRUE), - colorspace::diverging_hcl, grDevices::terrain.colors), + p = colorspace::diverging_hcl, ..., x = "top", col = "black", diff --git a/man/plot_slope.Rd b/man/plot_slope.Rd index 7536f2b..aa1aea1 100644 --- a/man/plot_slope.Rd +++ b/man/plot_slope.Rd @@ -9,8 +9,7 @@ plot_slope( lonlat = sf::st_is_longlat(routes), fill = TRUE, horiz = FALSE, - p = ifelse(test = requireNamespace("colorspace", quietly = TRUE), - colorspace::diverging_hcl, grDevices::terrain.colors), + p = colorspace::diverging_hcl, ..., x = "top", col = "black",