Learn R Programming

envirem (version 2.3)

otherTempExtremes: Temperature Extremes

Description

Generates max temp of the coldest month, min temp of the warmest month, mean temp of the coldest month, mean temp of the warmest month.

Usage

otherTempExtremes(meantempStack, mintempStack, maxtempStack)

Value

rasterStack of maxTempColdest, minTempWarmest, meanTempColdest, meanTempWarmest, in same units as input rasters.

Arguments

meantempStack

rasterStack of monthly mean temperature

mintempStack

rasterStack of monthly min temperature

maxtempStack

rasterStack of monthly max temperature

Author

Pascal Title

Examples

Run this code
# \donttest{
# Find example rasters
rasterFiles <- list.files(system.file('extdata', package='envirem'), full.names=TRUE)
env <- stack(rasterFiles)

# identify appropriate layers
tmean <- grep('tmean', names(env))
tmin <- grep('tmin', names(env))
tmax <- grep('tmax', names(env))

tmean <- env[[tmean]]
tmin <- env[[tmin]]
tmax <- env[[tmax]]

# calculate temperature extremes
otherTempExtremes(tmean, tmin, tmax)
# }

Run the code above in your browser using DataLab