SUBSET
Description
Extracts a subset of elements from a given Vector.
SUBSET(Vector<Any>, Scalar<Number>)
Extract the first or last x entries.
Parameters
Parameter | Description |
---|---|
vector | A vector of type any. |
x | A positive or negative number. When x is a positive number it starts to extract the number of entries stated in param2 from the beginning, when param2 is a negative number it starts to extract the number of entries stated in param2 from the end of the vector. |
Returns
Returns a Vector of type any.
SUBSET(Vector<any>, Scalar<Number>, Scalar<Number>)
Parameters
Parameter | Description |
---|---|
vector | A vector of type any. |
x | Position from which to start extracting elements. If negative, then position is counted from the end of the vector. |
y | Position until which to extract elements. If negative, then position is counted from the end of the vector. |
SUBSET(Vector<Event>, Scalar<Time>)
Extract entries from time start until the latest event (left argument is excluding, right is including)
Parameters
Parameter | Description |
---|---|
vector | A vector of type Event. |
start | The start time from which to start extracting entries until the latest. |
Returns
A Vector of type Event.
SUBSET(Vector<Event>, Scalar<Time>, Scalar<Time>)
Extract entries from time start until time end (left argument is excluding, right is including the time border)
Parameters
Parameter | Description |
---|---|
vector | A vector of type Event |
start | The start time from which to start extracting entries. (Excluded) |
end | The end time until which to extract entries. (Included) |
Returns
A Vector of type Event.
Examples
Extract the last entry from the vector GridPowerConsumption.
Extract all events from zero hour (midnight) until now.
Extract all events 2 days ago until 1 day ago.
Last updated