Skip to content

Commit

Permalink
Merge pull request #1063 from tibbles-and-tribbles/patch-41
Browse files Browse the repository at this point in the history
Update 08-read-write-plot.Rmd
  • Loading branch information
Nowosad authored Feb 3, 2024
2 parents d86eb0c + c6f2284 commit 3563d92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 08-read-write-plot.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ However, this approach has downsides: it is challenging for storing geometries m
Executing commands such as `sf::read_sf()` (the main function we use for loading vector data) or `terra::rast()` (the main function used for loading raster data) silently sets off a chain of events that reads data from files.
Many R packages provide example datasets (e.g. the dataset `spData::world` that we used in earlier chapters) and functions to get geographic datasets from a range of data sources.
All of them load the data into R or, more precisely, assign objects to your workspace.
This means that when objects are imported into R they are stored in RAM^[There are some exceptions to this rule, e.g., **terra**'s `SpatRaster` objects (which are C++ pointers to the actual data) and objects that represent database connections that can be imported into memory with functions such as `dplyr::collect()`, as outlined in Section \@ref(postgis)], can be listed with the `ls()` (and should be viewable in 'Environment' panels in your development environement) and can be accessed from the [`.GlobalEnv`](http://adv-r.had.co.nz/Environments.html) of the R session.
This means that when objects are imported into R they are stored in RAM^[There are some exceptions to this rule, e.g., **terra**'s `SpatRaster` objects (which are C++ pointers to the actual data) and objects that represent database connections that can be imported into memory with functions such as `dplyr::collect()`, as outlined in Section \@ref(postgis)], can be listed with `ls()` (and should be viewable in 'Environment' panels in your development environement) and can be accessed from the [`.GlobalEnv`](http://adv-r.had.co.nz/Environments.html) of the R session.

### Vector data {#iovec}

Expand All @@ -132,8 +132,8 @@ knitr::kable(head(sf_drivers, n = 6),
kableExtra::column_spec(2, width = "7em")
```

The following commands show the first three drivers reported the computer's GDAL installation (results can vary depending on the GDAL version installed) and a summary of the their features.
Note that the majority of drivers can write data while only a dozen or so formats can efficiently represent raster data in addition to vector data (see `?st_drivers()` for details):
The following commands show the first three drivers reported the computer's GDAL installation (results can vary depending on the GDAL version installed) and a summary of their features.
Note that the majority of drivers can write data, while only a dozen or so formats can efficiently represent raster data in addition to vector data (see `?st_drivers()` for details):

```{r 07-read-write-plot-17, eval=FALSE}
sf_drivers = st_drivers()
Expand Down

0 comments on commit 3563d92

Please sign in to comment.