View source: R/multi_extract.R
multi_extract | R Documentation |
multi_extract
Extract values of multiple spatial rasters for a set of geographical coordinates.
multi_extract(
raster_path,
coord,
folders = NULL,
files = NULL,
layers = NULL,
ncores = 1
)
raster_path |
character. Path to the folder with raster folders. |
coord |
data.frame or matrix. Longitude and Latitude from where to extract raster values. |
folders |
character. folders from which to get rasters for extraction. If NULL, all folders are selected. |
files |
numeric. Index for raster files to be extracted from each folder. If NULL, all files are selected. |
layers |
numeric. Index for layers to be extracted from each raster file. If NULL, all layers are selected. |
ncores |
integer. Number of cores to use in parallel processing. |
Data frame with extracted values from multiple rasters
## Not run:
# replace rasterpath with the directory on your computer containing worldclim data
temp_pres <-
multi_extract(raster_path = "mydir/rasters/worldclim/global_rasters_10min/",
coord = TtorquatusDistribution[-1],
folders = c("tmax_present", "tmin_present"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.