这是indexloc提供的服务,不要输入任何密码
Skip to content

Move some suggests to Config/Needs/website + document a bit tm_legend #990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,27 @@ Imports:
sf (>= 0.9-3),
stars (>= 0.4-2),
stats,
servr,
s2,
tmaptools (>= 3.1),
units (>= 0.6-1)
Suggests:
av,
cartogram,
colorspace,
dplyr,
ggplot2,
gifski,
knitr,
maptiles,
osmdata,
png,
rmapshaper,
rmarkdown,
bookdown,
servr,
shiny,
terra,
testthat (>= 3.2.0),
tidyr,
widgetframe,
geofacet,
mapview,
rstudioapi
Config/Needs/check: Nowosad/spDataLarge, lwgeom
Config/Needs/coverage: Nowosad/spDataLarge, lwgeom
Config/Needs/website: bookdown, geofacet, rmarkdown, mapview
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Expand Down
2 changes: 1 addition & 1 deletion R/misc_from_mapview.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ get_ide = function () {
}

## need to assign global variable .vsc
if(getRversion() >= "2.15.1") utils::globalVariables(c(".vsc"))
utils::globalVariables(c(".vsc"))

is_vscode = function() {
exists(".vsc") && exists("attach", envir = .vsc)
Expand Down
1 change: 1 addition & 0 deletions R/process_color.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ process_color <- function(col, alpha=NA, sepia_intensity=0, saturation=1, color_

new_cols <- do.call("rgb", c(unname(as.data.frame(res)), list(maxColorValue=255)))

rlang::check_installed("colorspace")
# color blind sim
sim_colors = switch(color_vision_deficiency_sim,
deutan = colorspace::deutan,
Expand Down
7 changes: 3 additions & 4 deletions R/tm_legend.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#' @param design Legend design `"standard"`.
#' @param reverse Should the legend be reversed?
#' @param na.show Show `NA` values in legend?
#' @param position PARAM_DESCRIPTION
#' @param width Width of the legend
#' @param height Height of the legend
#' @inheritParams tm_title
Expand All @@ -34,9 +33,9 @@
#' @param item.na.space PARAM_DESCRIPTION
#' @param item.shape PARAM_DESCRIPTION
#' @param ticks List of vectors of size 2 that determines the horizontal tick mark lines (for portrait legends). The values are the y-values of begin and endpoint of each tick mark.
#' @param ticks.disable.na PARAM_DESCRIPTION
#' @param ticks.col PARAM_DESCRIPTION
#' @param ticks.lwd PARAM_DESCRIPTION
#' @param ticks.disable.na Remove ticks for NA values
#' @param ticks.col Legend ticks color
#' @param ticks.lwd Legend ticks line widths
#' @param margins PARAM_DESCRIPTION
#' @param margin.item.text PARAM_DESCRIPTION
#' @param ... visual values, e.g. `col`, `fill`, `lwd`, can be specified. If so, they overrule the default visual values, which are determined by the drawn map objects (e.g. polygons)
Expand Down
2 changes: 2 additions & 0 deletions R/tmapLeafletRun.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ tmapLeafletRun = function(o, q, show, knit, args) {
paneHeight = -1
}
if (ide == "vscode") {
rlang::check_installed("servr")
# VSCode's viewer can't ignore cross-origin requests. Need to serve the
# map so assests can be read, e.g. .fgb files.
server <- servr::httd(
Expand All @@ -90,6 +91,7 @@ tmapLeafletRun = function(o, q, show, knit, args) {
viewer(url, height = paneHeight)
}
} else {
rlang::check_installed("servr")
viewerFunc = function(url) {
dir = get_url_dir(url)
switch(ide,
Expand Down
8 changes: 4 additions & 4 deletions man/tm_legend.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading