Learn R Programming

meteoland (version 1.0.3)

subsample: Sub-sampling procedure data

Description

Generates a spatial and/or temporal subset of procedure data

Usage

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

Value

An object of the same class as object.

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.

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

Run this code
data(exampleinterpolationdata)

oridates = exampleinterpolationdata@dates

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

Run the code above in your browser using DataLab