subsample: Sub-sampling procedure data

Description Usage Arguments Value Methods Examples

Description

Generates a spatial and/or temporal subset of procedure data

Usage

1
2
3
4
## S4 method for signature 'MeteorologyUncorrectedData'
subsample(object, bbox = NULL, stations = NULL, dates = NULL, buffer = 0)
## S4 method for signature 'MeteorologyInterpolationData'
subsample(object, bbox = NULL, stations = NULL, dates = NULL, buffer = 0)

Arguments

object

An object of a sub-class MeteorologyProcedureData-class.

bbox

A 2x2 numeric matrix with the boundaries of the target area. If NULL, the original boundary box is kept (except if stations is specified).

stations

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).

dates

A vector of Date with the subset of dates of interest. If NULL, all dates are kept.

buffer

A buffer to put around bbox for the spatial selection of data.

Value

An object of the same class as object.

Methods

subsample

signature(object = "MeteorologyUncorrectedData"): Generates a MeteorologyUncorrectedData object for a smaller area and a subset of dates.

subsample

signature(object = "MeteorologyInterpolationData"): Generates a MeteorologyInterpolationData object for a smaller area and a subset of dates.

Examples

1
2
3
4
5
6
data(exampleinterpolationdata)

oridates = exampleinterpolationdata@dates

#Interpolation data using the first ten dates (same boundary box)
subdata = subsample(exampleinterpolationdata, dates = oridates[1:10])

miquelcaceres/meteoland documentation built on May 8, 2019, 11:57 p.m.