View source: R/latitudinalMean.R
latitudinalMean | R Documentation |
A function to calculate mean values of a raster at every line of latitude, at the resolution of a given raster layer. Put another way, for each row in the raster, it calculates a mean.
latitudinalMean(rasterForCalculation)
rasterForCalculation |
A raster that contains data for plotting according to latitudinal value |
A vector of raster values for each absolute value of latitude.
Owens, H.L., Guralnick, R., 2019. climateStability: An R package to estimate climate stability from time-slice climatologies. Biodiversity Informatics 14, 8–13. https://doi.org/10.17161/bi.v14i0.9786
absLatitudinalMean
to calculate mean value for each absolute value of latitude.
precipDeviation <- terra::rast(system.file("extdata/precipDeviation.asc", package = "climateStability")) precipStability <- 1/precipDeviation latMean <- latitudinalMean(rasterForCalculation = precipStability) plot(latMean, main = "Precipitation Stability by Latitude", ylab = "Relative Stability", type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.