Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

intFun.grid.phase

Time distance in months


Description

Consider two rasters that show the month of the maximum value of a variable during the climatological mean annual cycle. Calculating the absolute difference between both rasters may yield values that range from 0 to 11 (type a). A more meaningful range that considers the circular nature of the annual cycle would range from 0 to 6 (type b). This function converts a raster of type (a) to type (b).

Usage

intFun.grid.phase(x)

Arguments

x

A raster object of type (a)

Value

A raster object of type (b)

Examples

library(raster)
# make some data
data <- runif(100,0,11)
data <- matrix(data, ncol=10)
data <- raster::raster(data)
# convert raster of type (a) to type (b)
data <- calc(data,intFun.grid.phase)
plot(data)
plot(data); text(data)

amber

Automated Model Benchmarking R Package

v1.0.3
GPL-3
Authors
Christian Seiler [cre, aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.