Initializes an object of class SpatialPointsMeteorology-class

SpatialPointsMeteorology(points, data, dates, dataByDate = FALSE)

Arguments

points

An object of class SpatialPoints-class. Row names of point coordinates are used to identify points.

data

A list of data frames. If dataByDate = FALSE the elements of data are assumed to correspond to points. If dataByDate = TRUE the elements of data are assumed to correspond to dates (see 'Details').

dates

Object of class "Date" describing the time period of meteorological estimates.

dataByDate

A flag to indicate that elements of data correspond to dates, as opposed to the default (dataByDate = FALSE) which assumes that elements correspond to points (see 'Details').

Details

There are two ways of building an object of of class SpatialPointsMeteorology-class. The first way (dataByDate = FALSE) is to supply as value for data a vector of data frames with one data frame per spatial point, with dates as rows and meteorological variables as columns. In this case all data frames must have the same number of rows (dates) and columns (variables). The second way (if dataByDate = TRUE) is to supply as value for data a vector of data frames with one data frame per date, with points as rows and meteorological variables as columns. In this case, the data frames may have different rows and different columns. Only the information corresponding to points will be taken and some variables may be missing.

Value

An object of class SpatialPointsMeteorology-class

Author

Miquel De Cáceres Ainsa, CREAF