Learn R Programming

meteoland (version 0.9.7)

averagearea: Averages area weather

Description

Averages the weather data series of points or grid pixels.

Usage

averagearea(object, na.rm = TRUE)

Arguments

na.rm

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

Value

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

Details

Assumes that all points/pixels represent the same area.

See Also

weathergeneration

Examples

Run this code
# NOT RUN {
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