Constructor
new Vector(length, optionsopt)
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
length |
number | Number of elements in this vector-like object. |
|||||||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Extends
Classes
Methods
$setElementMetadata(elementMetadatanullable) → {Vector}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
elementMetadata |
DataFrame |
<nullable> |
Arbitrary metadata for each vector element.
This should have number of rows equal to the vector length.
Alternatively |
Returns:
A reference to this Vector object after setting the element metadata to value
.
- Type
- Vector
$setMetadata(value) → {Annotated}
- Source:
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
value |
Object | Object containing the metadata. |
Returns:
A reference to this Annotated object.
- Type
- Annotated
$setNames(namesnullable) → {Vector}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
names |
Array |
<nullable> |
Array of strings containing a name for each range.
This should have length equal to the number of ranges.
Alternatively |
Returns:
A reference to this Vector object after setting the element metadata to value
.
- Type
- Vector
elementMetadata() → {DataFrame}
Returns:
A DataFrame with one row corresponding to each vector element, containing arbitrary per-element metadata.
- Type
- DataFrame
metadata() → {Map}
- Source:
- Overrides:
Returns:
Map containing arbitrary metadata.
- Type
- Map
names() → (nullable) {Array}
Returns:
Array of strings containing the name of each range, or null
if no names are available.
- Type
- Array
setElementMetadata(elementMetadatanullable, optionsopt) → {Vector}
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elementMetadata |
DataFrame |
<nullable> |
Arbitrary metadata for each vector element.
This should have number of rows equal to the vector length.
Alternatively |
|||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The Vector object after setting the element metadata to value
.
If inPlace = true
, this is a reference to the current instance, otherwise a new instance is created and returned.
- Type
- Vector
setMetadata(value, optionsopt) → {Annotated}
- Source:
- Overrides:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
value |
Object | Map | Object containing the metadata. |
||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The Annotated object after replacing the metadata.
If inPlace = true
, this is a reference to the current instance, otherwise a new instance is created and returned.
- Type
- Annotated
setNames(namesnullable, optionsopt) → {Vector}
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
names |
Array |
<nullable> |
Array of strings containing a name for each range.
This should have length equal to the number of ranges.
Alternatively |
|||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The Vector object after setting the names to value
.
If inPlace = true
, this is a reference to the current instance, otherwise a new instance is created and returned.
- Type
- Vector