Description Usage Arguments Objects from the Class Slots Extends Methods Author(s) Examples
The trefoil class is a data format for spatio-temporal data which is closely linked to the array class definition. In contrast to arrays the trefoil class always distinguished between spatial, temporal and other dimensions. The objects are always 3D merging all spatial dimensions in the first dimension, temporal dimensions in the second and everything else in the third dimension. is.trefoil
tests if x
is an Trefoil-object, as.trefoil
transforms x
to an trefoil object (if possible).
1 2 | is.trefoil(x)
as.trefoil(x,...)
|
x |
An object that should be either tested or transformed as/to an trefoil object. |
... |
additional arguments supplied for the conversion to a trefoil object. Allowed arguments for arrays and dataframes are |
Objects can be created by calls of the form new("trefoil", data, dim, dimnames, ...)
.
trefoil objects have three dimensions (spatial,temporal,datatype).
trefoils behave the same like arrays with 2 exceptions:
1.Dimensions of the object will not collapse (e.g. x[1,1,1]
will remain 3D instead of becoming 1D)
2.It is possible to extract subentries of a dimension just by typing its name (e.g. x["REGION_X",,]
will extract all data for region_x).
.Data
:Object of class "array"
~~
Class "array"
, from data part.
Class "structure"
, by class "array", distance 2.
Class "matrix"
, by class "array", distance 2, with explicit test and coerce.
Class "vector"
, by class "array", distance 3, with explicit coerce.
Class "vector"
, by class "array", distance 5, with explicit test and coerce.
signature(x = "trefoil")
: An extended []-syntax preventing the
collapsing of the array to less than 3 dimensions and allowing the direct access of subentries.
signature(e1 = "trefoil", e2 = "trefoil")
: This method allows to use basic arithmetic calculations such as + or * with trefoils.
Jan Philipp Dietrich
1 | showClass("trefoil")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.