Home Reference Source
import SEXPWrap from 'libr-bridge/SEXPWrap'
public class | source

SEXPWrap

Static Method Summary

Static Public Methods
public static

unprotect(depth: number)

Unprotect SEXPs

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

Return sizeof(SEXP) in byte.

public get

names: *

public set
public

sexp: *

Method Summary

Public Methods
public

asChar(): *

public

dataptr(): *

public

getAttribute(attrname: *): *

get attr of this variable.

public

getType(): *

public
public

isComplex(): *

public
public

isFactor(): *

public

isFrame(): *

public

isFunction(): *

public

isInteger(): *

public

isList(): *

Return true if this SEXP is List.

public

isLogical(): *

public

isNull(): *

Return true if this SEXP is null.

public

isReal(): *

public

isSymbol(): *

public
public

isVector(): *

Return true if this SEXP is Vector.

public

length(): *

Return the length of vector.

public

Preserve this SEXP.

public

Protect this SEXP

public

Release preserved SEXP.

public

setAttribute(attrname: *, newattr: *)

set attr of this variable.

public
public

unprotect(depth: number)

Private Methods
private

__initializeWithValue(value: *): *

Initialize this instance with specified value.

private

_getAttribute_raw(attrname: *): *

get attr SEXP of this variable.

private

Static Public Methods

public static unprotect(depth: number) source

Unprotect SEXPs

Params:

NameTypeAttributeDescription
depth number
  • optional
  • default: 1

Public Constructors

public constructor() source

Public Members

public get SEXPSize: * source

Return sizeof(SEXP) in byte.

public get names: * source

public set names source

public sexp: * source

Public Methods

public asChar(): * source

Return:

*

public dataptr(): * source

Return:

*

public getAttribute(attrname: *): * source

get attr of this variable.

Params:

NameTypeAttributeDescription
attrname *

Return:

*

public getType(): * source

Return:

*

public getValue(): string source

Return:

string

public isComplex(): * source

Return:

*

public isExpression(): * source

Return:

*

public isFactor(): * source

Return:

*

public isFrame(): * source

Return:

*

public isFunction(): * source

Return:

*

public isInteger(): * source

Return:

*

public isList(): * source

Return true if this SEXP is List.

Return:

*

public isLogical(): * source

Return:

*

public isNull(): * source

Return true if this SEXP is null.

Return:

*

public isReal(): * source

Return:

*

public isSymbol(): * source

Return:

*

public isValidString(): * source

Return:

*

public isVector(): * source

Return true if this SEXP is Vector. Please note single scalar value in R is vector.

Return:

*

public length(): * source

Return the length of vector.

Return:

*

public preserve() source

Preserve this SEXP. Please use protect() if you can.

public protect() source

Protect this SEXP

public release() source

Release preserved SEXP. protect()ed SEXP should be released with unprotect()

public setAttribute(attrname: *, newattr: *) source

set attr of this variable.

Params:

NameTypeAttributeDescription
attrname *
newattr *

public toString(): string source

Return:

string

public unprotect(depth: number) source

Params:

NameTypeAttributeDescription
depth number
  • optional
  • default: 1

Private Methods

private __initializeWithValue(value: *): * source

Initialize this instance with specified value.

Params:

NameTypeAttributeDescription
value *

Return:

*

private _getAttribute_raw(attrname: *): * source

get attr SEXP of this variable.

Params:

NameTypeAttributeDescription
attrname *

Return:

*

private _getValue_scalar(sexp: *): string source

Params:

NameTypeAttributeDescription
sexp *

Return:

string