Learn R Programming

meteoland (version 2.0.0)

meteoplot: Plots point meteorological series

Description

[Deprecated]

Simple plotting of a meteorological series for a given point.

Usage

meteoplot(
  object,
  index = 1,
  var = "MeanTemperature",
  fun = NULL,
  freq = NULL,
  dates = NULL,
  months = NULL,
  add = FALSE,
  ...
)

Arguments

object

A data frame with daily meteorological data (in this case index is not used) or an object of class SpatialPointsMeteorology. Alternatively, an object of class SpatialPointsDataFrame containing the meta data (columns dir, filename and possibly format) of meteorological files.

index

An integer to indicate the point in the SpatialPointsMeteorology object (or the SpatialPointsDataFrame object).

var

The meteorological variable to be plotted.

fun

The name of a function to be calculated for summaries (only valid if freq is specified).

freq

A string giving an interval specification for summaries (e.g., "week", "month", "quarter" or "year").

dates

An object of class Date to define the period to be plotted. If dates = NULL then all dates in object are processed.

months

A numeric vector to indicate the subset of months for which plotting is desired (e.g. c(7,8) for July and August). When combined with fun and freq, this parameter allows plotting summaries for particular seasons. For example fun = "sum" freq = "years" and months = 6:8 leads to plotting the sum over summer months of each year.

add

A flag to indicate wether drawing should be done on the current plot (using function lines).

...

Additional parameters for functions plot or lines.

Author

Miquel De Cáceres Ainsa, CREAF

Details

Daily precipitation is plotted using bars (i.e. type = "h" when calling plot). Otherwise the function draws lines (i.e. type = "l" when calling plot). If object is of class SpatialPointsDataFrame-class then the function reads the meteorological data to be plotted from the disk.

See Also

summarypoints

Examples

Run this code

# \donttest{
data(examplegridtopography)
data(exampleinterpolationdata)

#Creates spatial topography points from the grid
p = 1:2
spt = as(examplegridtopography, "SpatialPointsTopography")[p]

#Interpolation of two points for the whole time period (2000-2003)
mp = interpolationpoints(exampleinterpolationdata, spt)

#Plot interpolated meteorological series
meteoplot(mp,1, ylab="Daily mean temperature")

meteoplot(mp,1, ylab="Monthly mean temperature", fun=mean, freq="months")
# }

Run the code above in your browser using DataLab