Data cast type helper for the primitive array in CLR function code
CLRVector
01 Syntax
SMRUCC.Rsharp.Runtime.Vectorization.CLRVector
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| asLong | 1 | cast any to int(64 bit) |
| safeCharacters | 1 | |
| asScalarCharacter | 1 | get the first element in the input vector as character |
| asCharacter | 1 | try to cast any object to .net clr character vector |
| asInteger | 1 | Try to cast any clr object as the integer vector unsafely |
| asNumeric | 1 | cast any .net clr object to a numeric vector |
| asLogical | 1 | NULL -> false |
| asObject | 1 | try to cast any kind of clr data input as object array |
| asDate | 1 | |
| asRawByte | 1 | |
| asFloat | 1 | |
| asScalarNumber | 1 | |
| asScalarLogical | 1 |
03 Members
asLong(
Object)cast any to int(64 bit)
Parameters
| Name | Type | Description |
|---|---|---|
x | Object | - |
safeCharacters(
Object)Parameters
| Name | Type | Description |
|---|---|---|
x | Object | - |
Returns
the returns string array always not null
asScalarCharacter(
Object)get the first element in the input vector as character
Parameters
| Name | Type | Description |
|---|---|---|
x | Object | - |
Returns
this function will returns nothing if the input data is null
asCharacter(
Object)try to cast any object to .net clr character vector
Remarks
- if the given x is nothing then function returns nothing
- if there are NULL value inside x vector, corresponding empty string element will generates
Parameters
| Name | Type | Description |
|---|---|---|
x | Object | - |
Returns
this function returns nothing if the input object x is nothing
asInteger(
Object)Try to cast any clr object as the integer vector unsafely
Parameters
| Name | Type | Description |
|---|---|---|
x | Object | - |
Returns
this function will returns nothing if the given object x is nothing
asNumeric(
Object)cast any .net clr object to a numeric vector
Parameters
| Name | Type | Description |
|---|---|---|
x | Object | - |
Returns
an empty vector will be returns if the given object x is nothing
asLogical(
Object)NULL -> false
Parameters
| Name | Type | Description |
|---|---|---|
x | Object | - |
asObject(
Object)try to cast any kind of clr data input as object array
Remarks
a wrapper function of RVectorExtensions.asVector().
Parameters
| Name | Type | Description |
|---|---|---|
x | Object | - |
asDate(
Object)asRawByte(
Object)asFloat(
Object)asScalarNumber(
Object)asScalarLogical(
Object)