end year; if omitted will use same as start, and if
start is omitted, will use maximum year
id
unique station identifier used to extract a subset of data
from dat
rm.id
logical; removes id field from
dat, default is TRUE
Value
Returns a subset of a data.frame with the same fields as
dat, except for id (if it is present and rm.id =
TRUE).
Details
This utility function is useful for creating temporal subsets of
climate data and for extracting a single station out of a
data.frame with multiple climate stations. The dat
object can have other fields (other than the standard set of fields),
which will be returned.
If id is used, that station will be extracted from
dat. The returned object will no longer have an id
field, unless rm.id = FALSE. If id is not provided, but
there are more than one unique IDs in dat, the first unique ID
will be extracted, with a warning.