deviationThroughTime {climateStability}R Documentation

Calculating Deviation Through Time

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

deviationThroughTime(variableDirectory, timeSlicePeriod)

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.

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, HL, and RP Guralnick. Submitted, Biodiversity Informatics.

See Also

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

Examples


#Even time slices
precipDeviation <- deviationThroughTime("precipfiles/", 1000);

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



[Package climateStability version 0.1.1 Index]