subsetVar: Extract a grid from a multigrid object

View source: R/subsetGrid.R

subsetVarR Documentation

Extract a grid from a multigrid object

Description

Extracts a grid from a multigrid object. Multimember multigrids are supported. Subroutine of subsetGrid.

Usage

subsetVar(grid, var)

Arguments

var

Character vector indicating the variables(s) to be extracted

multiGrid

Input multigrid to be subset

drop

Logical (default is TRUE). Drop or keep dimensions of length 1.

Details

Argument var is insensitive to the order of the variables, i.e.: variables will be always returned in the same order they are in the original multigrid.

An attribute 'subset' with value 'subsetVar' is added to the Variable slot of the output subset.

Value

Either a (multimember)grid or (multimember)multigrid if one ore more variables are selected respectively.

Author(s)

J. Bedia

See Also

Other subsetting: getTemporalIntersection(), intersectGrid(), intersectGrid.spatial(), intersectGrid.time(), limitArea(), subsetCluster(), subsetDimension(), subsetGrid(), subsetMembers(), subsetRuntime(), subsetSeason(), subsetSpatial(), subsetStation(), subsetYears()


SantanderMetGroup/transformeR documentation built on Nov. 25, 2024, 1:25 p.m.