getWeights: Calculate weights from latitude

Description Usage Arguments Value Examples

Description

Calculate weights using the cosine of latitude to compensate for area distortion of non-projected lat/lon data

Usage

1

Arguments

x

a Raster* object

Value

a numeric vector of weights

Examples

1
2
3
4
5
6
7
8
9
data("australiaGPCP")
wghts <- getWeights(australiaGPCP)
wghts.rst <- australiaGPCP[[1]]
wghts.rst[] <- wghts

opar <- par(mfrow = c(1,2))
plot(australiaGPCP[[1]], main = "data")
plot(wghts.rst, main = "weights")
par(opar)

environmentalinformatics-marburg/Reot documentation built on May 16, 2019, 7:50 a.m.