Skip to content

Commit

Permalink
condition on tmap4
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbivand committed Aug 2, 2024
1 parent d0ce698 commit 2b349a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: spatialreg
Version: 1.3-5
Date: 2024-06-14
Date: 2024-08-04
Title: Spatial Regression Analysis
Encoding: UTF-8
Authors@R: c(person("Roger", "Bivand", role = c("cre", "aut"), email = "[email protected]", comment=c(ORCID="0000-0003-2392-6140")),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Version 1.3-5 (development)

* Condition on forthcoming `tmap` 4

* #52 subgraph updates

# Version 1.3-4 (2024-06-10)
Expand Down
6 changes: 5 additions & 1 deletion vignettes/sids_models.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ nc$both <- factor(paste(nc$L_id, nc$M_id, sep=":"))
is_tmap <- FALSE
if (require(tmap, quietly=TRUE)) is_tmap <- TRUE
is_tmap
tmap4 <- packageVersion("tmap") >= "3.99"
```

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

```{r, eval=is_tmap, echo=TRUE}
nc2$fitIV <- fitted.values(ecarIVaw)
sf_use_s2(FALSE)
if (tmap4) {
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)
} else {
tm_shape(nc2) + tm_fill("fitIV")
}
```

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

0 comments on commit 2b349a3

Please sign in to comment.