Skip to content

Commit ed607a2

Browse files
committed
Explicitly set encoding to UTF-8 in crs string
and update the data stored in the package in order ot get rid of R CMD Check warning
1 parent 3e9d743 commit ed607a2

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

data-raw/datasets.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
# do you want to use georeferenced data?
44
use_shape <- TRUE
55

6-
if(use_shape){
7-
rabimo_inputs_2025 <- readRDS("../abimo.scripts/assets/rabimo_inputs_2025_geo.rds")
8-
sf::st_as_sf(rabimo_inputs_2025$data)
6+
rabimo_inputs_2025 <- if (use_shape) {
7+
inputs <- readRDS("../abimo.scripts/assets/rabimo_inputs_2025_geo.rds")
8+
inputs$data <- sf::st_as_sf(inputs$data)
9+
Encoding(attr(inputs$data$Shape, "crs")$wkt) <- "UTF-8"
10+
inputs
911
} else {
10-
rabimo_inputs_2025 <- readRDS("../abimo.scripts/assets/rabimo_inputs_2025.rds")
12+
readRDS("../abimo.scripts/assets/rabimo_inputs_2025.rds")
1113
}
1214

1315
usethis::use_data(rabimo_inputs_2025, overwrite = TRUE, compress = "xz")

data/rabimo_inputs_2025.rda

-11.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)