Skip to content

Commit 2b349a3

Browse files
committed
condition on tmap4
1 parent d0ce698 commit 2b349a3

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: spatialreg
22
Version: 1.3-5
3-
Date: 2024-06-14
3+
Date: 2024-08-04
44
Title: Spatial Regression Analysis
55
Encoding: UTF-8
66
Authors@R: c(person("Roger", "Bivand", role = c("cre", "aut"), email = "Roger.Bivand@nhh.no", comment=c(ORCID="0000-0003-2392-6140")),

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Version 1.3-5 (development)
22

3+
* Condition on forthcoming `tmap` 4
4+
35
* #52 subgraph updates
46

57
# Version 1.3-4 (2024-06-10)

vignettes/sids_models.Rmd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ nc$both <- factor(paste(nc$L_id, nc$M_id, sep=":"))
6464
is_tmap <- FALSE
6565
if (require(tmap, quietly=TRUE)) is_tmap <- TRUE
6666
is_tmap
67+
tmap4 <- packageVersion("tmap") >= "3.99"
6768
```
6869

6970
We will now examine the data set reproduced from Cressie and
@@ -161,8 +162,11 @@ summary(ecarIVaw)
161162

162163
```{r, eval=is_tmap, echo=TRUE}
163164
nc2$fitIV <- fitted.values(ecarIVaw)
164-
sf_use_s2(FALSE)
165+
if (tmap4) {
166+
tm_shape(nc2) + tm_polygons(fill="fitIV", fill.scale=tm_scale(values="brewer.yl_or_br"), fill.legend=tm_legend(position=tm_pos_in("left", "bottom"), frame=FALSE, item.r = 0), lwd=0.01)
167+
} else {
165168
tm_shape(nc2) + tm_fill("fitIV")
169+
}
166170
```
167171

168172
The final figure shows the value of the log likelihood function for the null model (I):

0 commit comments

Comments
 (0)