Summarizes the meteorology of a single location, a set of spatial points, pixels in a grid, or weather stations of interpolation data.
summarypixels(
pixels,
var,
fun = mean,
freq = NULL,
dates = NULL,
months = NULL,
...
)summarygrid(
grid,
var,
fun = mean,
freq = NULL,
dates = NULL,
months = NULL,
...
)
summaryinterpolationdata(
object,
var,
fun = mean,
freq = NULL,
dates = NULL,
months = NULL,
...
)
summarypoint(
x,
var,
fun = "mean",
freq = NULL,
dates = NULL,
months = NULL,
...
)
summarypoints(
points,
var,
fun = mean,
freq = NULL,
dates = NULL,
months = NULL,
...
)
Function summarypoint
returns a named vector
of values with dates as names.
Functions summarypoints
and
summaryinterpolationdata
return an object of class
SpatialPointsDataFrame
containing summaries (either one
variable or several if freq
is specified).
Functions
summarygrid
and summarypixels
return an object of class
SpatialGridDataFrame
and SpatialPixelsDataFrame
,
respectively, containing the summaries analogously to summarypoints
.
An object of class
SpatialPixelsMeteorology-class
with the meteorological data
for grid pixels, or a string pointing to a NetCDF.
The name of the meteorological variable to be summarized.
The function to be calculated on values of each point. If
freq
is specified, the function will be calculated by intervals.
A string giving an interval specification (e.g., "week"
,
"month"
, "quarter"
or "year"
). If NULL
then no
intervals are defined.
An object of class Date
to define the period to
be summarized. If dates = NULL
then all dates in points
are
processed.
A numeric vector to indicate the subset of months for which
summary is desired (e.g. c(7,8)
for July and August). This parameter
allows studying particular seasons, when combined with freq
. For
example freq = "years"
and months = 6:8
leads to summarizing
summer months of each year.
Additional parameters to fun
.
An object of class SpatialGridMeteorology-class
with the meteorological data for a grid, or a string pointing to a NetCDF.
An object of class
MeteorologyInterpolationData-class
.
A data frame with dates in rows and meteorological variables in columns.
An object of class
SpatialPointsMeteorology-class
with the coordinates and
meteorological data of the locations for which summaries are desired.
Alternatively, an object of class SpatialPointsDataFrame
containing the meta data (columns dir
, filename
and possibly
format
) of meteorological files that will be sequentially read from
the disk. Finally, points
can also be a string pointing to a netCDF.
Miquel De Cáceres Ainsa, CREAF
Antoine Cabon, CTFC
If var="ALL"
then function summarypoints
produces a summary of
all variables with default statistics and returns an object of class
SpatialPointsMeteorology
.
SpatialPointsMeteorology-class