Learn R Programming

OpenRange (version 0.0.1)

OpenRange_api_load_species: Load range maps for given species using the API.

Description

OpenRange_api_load_species extracts range maps for the specified species.

Usage

OpenRange_api_load_species(species, ...)

Value

Range maps for specified species.

Arguments

species

A single species.

...

Additional arguments passed to internal functions.

See Also

Other range functions: OpenRange_api_species(), OpenRange_get_license(), OpenRange_get_stats(), OpenRange_list_scenarios(), OpenRange_load_species(), OpenRange_sf(), OpenRange_species()

Examples

Run this code
# \donttest{

library(maps) #a convenient source of maps
library(sf)

temp_dir <- file.path(tempdir(), "BIEN_temp")

#Download ranges
Abies_poly <- OpenRange_api_load_species(species = "Abies_amabilis")

#Plotting files
plot(Abies_poly[,1])#plots the range, but doesn't mean much without any reference
map('world', fill = TRUE, col = "grey")#plots a world map (WGS84 projection), in grey
plot(Abies_poly,col="forest green",add=TRUE) #adds the range to the map

#Getting data from the files
Abies_poly |>
 st_drop_geometry()

# }

Run the code above in your browser using DataLab