vector
01 Syntax
SMRUCC.Rsharp.Runtime.Internal.Object.vector
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| .ctor | 3 | value copy |
| setNames | 2 | 出错的时候会返回Message |
| getByIndex | 2 | 以R语言中的下表的方式访问数组元素,所以这个函数的i参数应该是从1开始的 |
| fromScalar | 1 | create a vector from a scalar value |
| getByName | 1 | |
| hasName | 1 | |
| getNames | 1 | |
| setNamesSafe | 1 | |
| setByIndex | 1 | |
| ToString | 1 | |
| asVector | 1 | |
| isVectorOf | 1 | |
| op_Equality | 1 | |
| op_Inequality | 1 |
03 Properties
04 Members
#ctor(vector)
value copy
Parameters
| Name | Type | Description |
|---|---|---|
vec | vector | - |
#ctor(
Array, RType)这个构造函数主要是应用于内部编程的快速创建
Parameters
| Name | Type | Description |
|---|---|---|
input | Array | - |
type | RType | should be the array element type |
Create a vector from a pipeline model and given array element model type
Remarks
try to make the collection data generic in this constructor function
Parameters
| Name | Type | Description |
|---|---|---|
model | Type | element type of the array |
input | IEnumerable | - |
setNames(
String(), Environment)出错的时候会返回Message
Parameters
| Name | Type | Description |
|---|---|---|
names | String() | - |
envir | Environment | - |
getByIndex(
Int32)以R语言中的下表的方式访问数组元素,所以这个函数的i参数应该是从1开始的
Remarks
这个函数是一个安全的函数,下表越界的时候按照R语言的处理规则,不会抛出错误,而是返回空值
Parameters
| Name | Type | Description |
|---|---|---|
i | Int32 | 这个下标值应该是从1开始的 |
getByIndex(
Int32())Parameters
| Name | Type | Description |
|---|---|---|
i | Int32() | 这个下标值应该是从1开始的 |
fromScalar(
Object)create a vector from a scalar value
Parameters
| Name | Type | Description |
|---|---|---|
x | Object | - |
unit
do conversion from current vector to another scale.
data
factor
length
getByName(
String)hasName(
String)getNames()
setNames(
String())setNamesSafe(
IEnumerable(Of String), Environment)ToString()
asVector(
IEnumerable(Of T), unit)isVectorOf(
Object, TypeCodes)op_Equality(vector,
String)op_Inequality(vector,
String)