slice-scidbst-methods: Slice a scidbst object at a particular dimension value

Description Usage Arguments Value See Also Examples

Description

Takes a dimension name and a value to create a slice of an array. This usually means reducing the dimensions of an array by one. The dimension name and value choosen fixed and the other dimensions and attributes are returned.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S4 method for signature 'scidbst,character,character'
slice(x, d, n)

## S4 method for signature 'scidbst,character,numeric'
slice(x, d, n)

## S4 method for signature 'scidbst,character,integer'
slice(x, d, n)

## S4 method for signature 'scidbst,missing,POSIXt'
slice(x, d, n)

## S4 method for signature 'scidbst,character,POSIXt'
slice(x, d, n)

Arguments

x

scidbst array object

d

name of a dimension

n

coordinate value to slice on, e.g. a POSIXt, POSIXt conform date/time string, temporal index

Value

scidbst array with a reduced number of dimensions.

See Also

slice

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
scidbconnect(...)
scidbst.obj = scidbst(array_name) #scidb array with spatial and temporal dimension

#examples on the temporal dimension
slice1 = slice(scidbst.obj,"t","0") # @ temporal index 0
slice2 = slice(scidbst.obj,"t",1) # @ temporal index 1
slice3 = slice(scidbst.obj,"t","2016-05-05") # @ the temporal index for a date
# other existing dimensions are also applicable

## End(Not run)

flahn/scidbst documentation built on May 16, 2019, 1:15 p.m.