Skip to content

Commit

Permalink
system.file("shapes/world.gpkg", package = "spData") not .shp
Browse files Browse the repository at this point in the history
Close #1151
  • Loading branch information
Robinlovelace committed Jan 22, 2025
1 parent 68e7081 commit 413a959
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions 02-spatial-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand Down
4 changes: 2 additions & 2 deletions code/chapters/02-spatial-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 413a959

Please sign in to comment.