Description Usage Format Source See Also Examples
a sf
object of simplified lines of transcontinental highway network
See data-raw/afrilearndata-creation.R for how the data object is created.
1 |
Formal class 'sf'; 100 rows, 2 columns
Name character vector of section names
geom sfc_LINESTRING
Geographical coordinates WGS84 datum (CRS EPSG 4326)
https://en.wikipedia.org/wiki/Trans-African_Highway_network
1 2 3 4 5 6 7 8 9 10 11 12 | if (requireNamespace("sf", quietly = TRUE)) {
library(sf)
data(afrihighway)
# or
filename <- system.file("extdata","trans-african-highway.kml",
package="afrilearndata", mustWork=TRUE)
afrihighway <- sf::read_sf(filename)
#remove Description column, only has contents in first row
afrihighway <- afrihighway[ , which(names(afrihighway)!='Description')]
plot(sf::st_geometry(afrihighway))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.