Learn R Programming

meteoland (version 1.0.3)

averagearea: Averages area weather

Description

Averages the weather data series of points or grid pixels.

Usage

averagearea(object, na.rm = TRUE)

Value

An object of class as the input SpatialPointsMeteorology-class with weather series corresponding to the spatial average of the input.

Arguments

object

An object of class SpatialPointsMeteorology-class, SpatialGridMeteorology-class or SpatialPixelsMeteorology-class.

na.rm

Boolean flag to indicate that missing values should be excluded from averages.

Author

Miquel De Cáceres Ainsa, CREAF

Details

Assumes that all points/pixels represent the same area.

See Also

weathergeneration

Examples

Run this code
data(examplegridtopography)
data(exampleinterpolationdata)

#Interpolation of meteorology over a grid for two days
ml = interpolationgrid(exampleinterpolationdata, examplegridtopography,
                       as.Date(c("2001-02-03", "2001-06-03")))

#Call averaging function
pa = averagearea(ml)

#Spatial information
pa

#Weather data
pa@data[[1]]

Run the code above in your browser using DataLab