Description Usage Arguments Details Value Note See Also Examples
This function is based on the scidb subarray function. It will create a subset of the array based on the stated dimension limits. Based
on the 'between' parameter either the 'subarray' or the 'between' function will be used in SciDBs AFL query. When 'between is set TRUE
, then the spatial
and/or temporal references will not be changed, because the dimension values are not recalculated. If 'subarray' is used in scidb, then
the dimension values are shifted to the new lower boundaries, which requires an adaption of the references (if necessary). In either case the resulting
scidbst object will have a modified dimensional extent.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## S4 method for signature 'scidbst,numeric'
subarray(x, limits, between = FALSE)
## S4 method for signature 'scidbst,character'
subarray(x, limits, between = FALSE)
## S4 method for signature 'scidbst,Extent'
subarray(x, limits, between = FALSE)
## S4 method for signature 'scidbst,TemporalExtent'
subarray(x, limits, between = FALSE)
## S4 method for signature 'scidbst,scidbst'
subarray(x, limits, between = FALSE)
## S4 method for signature 'scidb,numeric'
subarray(x, limits, between = FALSE)
|
x |
scidbst array object |
limits |
vector of coordinate ranges or a character string (see Details) or |
between |
(logical) Whether or not the |
Like in the original subarray
method limits
parameter needs to be either a vector of numerics or characters or a character string. The vector needs to
have two times the number of dimension as elements in it. This also applies to the character string, which shall contain the limits
divided by commas (','). Examples: c(0,0,0,10,10,10); "0,0,0,10,10,10". Also unbounded dimension statements are supported. Use the
asterisk ('*') to define an unbounded dimension value.
The scidbst package also allows Extent and TemporalExtent objects as limits. Missing values regarding the spatial extent or temporal extent
are kept as is.
modified scidbst array object
The package will provide this function as a generic S4 function. This means that the original subarray method from the scidb package will not be recognized as S4 function. Use scidb::subarray to call the original method.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
scidbconnect(...)
chicago = scidbst("chicago_sts")
# Using character strings and vector
chicago_sub1 = subarray(x=chicago,c(501,285,2,901,585,3),between=FALSE) #minimum values, then maximum values for all dimensions
chicago_sub2 = subarray(x=chicago,limits=c("501","285","2","901","585","*"))
chicago_sub3 = subarray(x=chicago,limits="501,285,2,901,585,3")
# Using an extent object
extent = c(448000,451000,4635000,4640000)
chicago_sub4 = subarray(x=chicago,limits=extent,between=FALSE)
# Using a Temporal extent
te = textent(as.POSIXct("2016-05-03"),as.POSIXct("2016-05-05"))
chicago_sub5 = subarray(x=chicago,limits=te,between=FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.