deviationThroughTime: Calculating Deviation Through Time

Description Usage Arguments Details Value References See Also Examples

View source: R/deviationThroughTime.R

Description

A function that reads time-slice rasters of data for a given climate (typically processed data from a climate model run, such as the results of an analysis using PaleoView (Fordham, *et al.* 2017, Ecography)) in a given directory and calculates average deviation per year across time slices.

Usage

1
2
deviationThroughTime(variableDirectory, timeSlicePeriod,
  fileExtension = "asc")

Arguments

variableDirectory

A directory containing at least two time slice rasters for a given climate variable.

timeSlicePeriod

Either a single number, in years, representing the time period elapsed between temporally-even climate variable raster slices, or a vector corresponding to periods, in years, between temporally-uneven time slices.

fileExtension

a character that describes the fileExtension corresponding to the all suported formats in writeFormats

Details

Make sure that files in the 'variableDirectory' are read into 'R' in order.

If you are specifying temporally-uneven time slices with 'timeSlicePeriod', make sure that each number corresponds to the number of years elapsed *between* time slices, *in the same order as the files were read into 'R'*. There should be one less number than the number of files.

Value

A raster showing the geographic distribution of climate deviation through time for a particular climate variable.

References

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

See Also

precipDeviation and temperatureDeviation for examples of data produced using this function.

Examples

1
2
3
4
5
6
#Even time slices
precipDeviation <- deviationThroughTime("precipfiles/", 1000)

#Uneven time slices
precipDeviationUneven <- deviationThroughTime("unevenPrecipFiles",
                                              c(1000, 1000, 1000, 1000, 5000, 5000, 6000))

climateStability documentation built on Nov. 21, 2019, 5:08 p.m.