From 413a959ad0cca05de661754d2cefc0878041c26e Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Wed, 22 Jan 2025 22:45:50 +0000 Subject: [PATCH] system.file("shapes/world.gpkg", package = "spData") not .shp Close #1151 --- 02-spatial-data.Rmd | 4 ++-- code/chapters/02-spatial-data.R | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/02-spatial-data.Rmd b/02-spatial-data.Rmd index 2092e54e2..ffd7cab40 100644 --- a/02-spatial-data.Rmd +++ b/02-spatial-data.Rmd @@ -281,8 +281,8 @@ Unlike the function `st_read()`, which returns attributes stored in a base R `da This is demonstrated below: ```{r, message=FALSE} -world_dfr = st_read(system.file("shapes/world.shp", package = "spData")) -world_tbl = read_sf(system.file("shapes/world.shp", package = "spData")) +world_dfr = st_read(system.file("shapes/world.gpkg", package = "spData")) +world_tbl = read_sf(system.file("shapes/world.gpkg", package = "spData")) class(world_dfr) class(world_tbl) ``` diff --git a/code/chapters/02-spatial-data.R b/code/chapters/02-spatial-data.R index 44f6651e4..6aa19ea41 100644 --- a/code/chapters/02-spatial-data.R +++ b/code/chapters/02-spatial-data.R @@ -100,8 +100,8 @@ world_mini ## --------------------------------------------------------------------------------------------------- -world_dfr = st_read(system.file("shapes/world.shp", package = "spData")) -world_tbl = read_sf(system.file("shapes/world.shp", package = "spData")) +world_dfr = st_read(system.file("shapes/world.gpkg", package = "spData")) +world_tbl = read_sf(system.file("shapes/world.gpkg", package = "spData")) class(world_dfr) class(world_tbl)