From 4bf91dfd12c76d3177060cfc6058a0825b886994 Mon Sep 17 00:00:00 2001 From: mtennekes Date: Tue, 6 Feb 2024 16:54:52 +0100 Subject: [PATCH] fixed #825 --- R/tmapGridAux.R | 2 +- R/tmapShape.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/tmapGridAux.R b/R/tmapGridAux.R index d3d8b89e..309802cc 100644 --- a/R/tmapGridAux.R +++ b/R/tmapGridAux.R @@ -77,7 +77,7 @@ tmapGridTilesPrep = function(a, bs, id, o) { } ss = lapply(xs, function(x) { - if (is.null(x)) NULL else do.call(tmapShape, list(shp = x, is.main = FALSE, crs = crs, bbox = NULL, unit=NULL, filter=NULL, shp_name = "x", smeta = list(), o = o)) + if (is.null(x)) NULL else do.call(tmapShape, list(shp = x, is.main = FALSE, crs = crs, bbox = NULL, unit=NULL, filter=NULL, shp_name = "x", smeta = list(), o = o, tmf = NULL)) }) srgb = tm_scale_rgb(maxValue = 255, value.na = "#FFFFFF") diff --git a/R/tmapShape.R b/R/tmapShape.R index b3fae02b..0aa83cc1 100644 --- a/R/tmapShape.R +++ b/R/tmapShape.R @@ -134,7 +134,7 @@ tmapShape.SpatRaster = function(shp, is.main, crs, bbox, unit, filter, shp_name, names(ctabs) = dtcols names(cats) = dtcols - make_by_vars(dt, tmf, smeta) + if (!is.null(tmf)) make_by_vars(dt, tmf, smeta) if (is.null(filter)) filter = rep(TRUE, nrow(dt)) dt[, ':='(sel__ = filter)] # tmapID__ = 1L:nrow(dt),