File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
content/tutorials/r_inla/spatial Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ output:
1616library(knitr)
1717opts_chunk$set(
1818 message = FALSE,
19+ warning = FALSE, # suppress rgdal CRS warnings here and there
1920 dev = "cairo_pdf",
2021 dpi = 300
2122)
@@ -329,8 +330,8 @@ PRborder %>%
329330 list() %>%
330331 Polygons(ID = 1) %>%
331332 list() %>%
332- SpatialPolygons(proj4string = CRS("+init=epsg :4326")) %>%
333- spTransform(CRS("+init=epsg :5880")) -> boundary
333+ SpatialPolygons(proj4string = CRS(SRS_string = "EPSG :4326")) %>%
334+ spTransform(CRS(SRS_string = "EPSG :5880")) -> boundary
334335```
335336
336337``` {r mesh-rainfall-1}
@@ -577,7 +578,7 @@ si <- inla.stack.index(stack_all, "grid")$data
577578grid_data %>%
578579 bind_cols(model_grid$summary.fitted.values[si, ]) %>%
579580 `coordinates<-`(~X + Y) %>%
580- `proj4string<-`(CRS("+init=epsg :5880")) -> gd
581+ `proj4string<-`(CRS(SRS_string = "EPSG :5880")) -> gd
581582gd[!is.na(over(gd, boundary)), ] %>%
582583 as.data.frame() %>%
583584 ggplot() + geom_tile(aes(x = X, y = Y, fill = mean)) + coord_fixed()
You can’t perform that action at this time.
0 commit comments