Generates a spatial and/or temporal subset of procedure data
# S4 method for MeteorologyUncorrectedData subsample(object, bbox = NULL, stations = NULL, dates = NULL, buffer = 0) # S4 method for MeteorologyInterpolationData subsample(object, bbox = NULL, stations = NULL, dates = NULL, buffer = 0)
An object of a sub-class
A 2x2 numeric matrix with the boundaries of the target area. If
NULL, the original boundary box is kept (except if
stations is specified).
A numeric, character or logical vector specifying a subset of weather stations. If
NULL all original weather stations are kept (except if
bbox is specified).
A vector of
Date with the subset of dates of interest. If
NULL, all dates are kept.
A buffer to put around bbox for the spatial selection of data.
An object of the same class as
data(exampleinterpolationdata) oridates = exampleinterpolationdata@dates #Interpolation data using the first ten dates (same boundary box) subdata = subsample(exampleinterpolationdata, dates = oridates[1:10]) #> Warning: 24 stations had no data after subsetting and were removed.