R statistical functions

RCreateServerSession

Declaration

RSession RCreateServerSession(string server, int port, string user, string password)

Description

Creates a new connection to an Rserve instance.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
server Host the Rserve instance is running on.
port Port the Rserve instance is listening to.
user User name to be used on the Rserve instance.
password Password to be used for connecting to the Rserve instance.

Return Value

A session to the Rserve instance, if no errors occurred.

REndServerSession

Declaration

void REndServerSession(RSession session)

Description

Closes an Rserve session.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
session Session to be closed.

Return Value

Does not return a value.

REndSession

Declaration

void REndSession()

Description

Ends an R session and allows to start another session.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters

The function has no parameters.

Return Value

Does not return a value.

REvaluate

Declaration

bool REvaluate(string statement, bool ignoreExceptions)

Description

Evaluates an R statement or a list of statements.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
statement The statement to evaluate. Multi-line statements have to be separated by carriage return and line feed.
ignoreExceptions If this flag is true, R exceptions will be ignored.

Return Value

True, if the statement was executed. False, if a parse error occurred.

REvaluate

Declaration

bool REvaluate(string statement)

Description

Evaluates an R statement or a list of statements.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
statement The statement to evaluate. Multi-line statements have to be separated by carriage return and line feed.

Return Value

True, if the statement was executed. False, if a parse error occurred.

REvaluate

Declaration

bool REvaluate(RSession session, string statement)

Description

Evaluates an R statement or a list of statements.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
session The session to an Rserve instance.
statement The statement to evaluate. Multi-line statements have to be separated by carriage return and line feed.

Return Value

True, if the statement was executed. False, if a parse error occurred.

REvaluate

Declaration

bool REvaluate(RSession session, string statement, bool ignoreExceptions)

Description

Evaluates an R statement or a list of statements.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
session The session to an Rserve instance.
statement The statement to evaluate. Multi-line statements have to be separated by carriage return and line feed.
ignoreExceptions If this flag is true, R exceptions will be ignored.

Return Value

True, if the statement was executed. False, if a parse error occurred.

RGetDoubleVector

Declaration

DoubleArray RGetDoubleVector(string statement)

Description

Gets a double vector from R into a DoubleArray in BI#.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
statement An R statement that results into an R double vector.

Return Value

The double array representing the double vector.

RGetDoubleVector

Declaration

DoubleArray RGetDoubleVector(RSession session, string statement)

Description

Gets a double vector from R into a DoubleArray in BI#.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
session The session to an Rserve instance.
statement An R statement that results into an R double vector.

Return Value

The double array representing the double vector.

RGetIntegerVector

Declaration

IntArray RGetIntegerVector(string statement)

Description

Receives an int vector from R into an IntArray in BI#.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
statement An R statement that results into an R int vector.

Return Value

The IntArray representing the int vector.

RGetIntegerVector

Declaration

IntArray RGetIntegerVector(RSession session, string statement)

Description

Receives an int vector from R into an IntArray in BI#.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
session The session to an Rserve instance.
statement An R statement that results into an R int vector.

Return Value

The IntArray representing the int vector.

RGetStringVector

Declaration

StringArray RGetStringVector(string statement)

Description

Gets a string vector from R into a StringArray in BI#.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
statement An R statement that results into an R string vector.

Return Value

The StringArray representing the string vector.

RGetStringVector

Declaration

StringArray RGetStringVector(RSession session, string statement)

Description

Gets a string vector from R into a StringArray in BI#.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
session The session to an Rserve instance.
statement An R statement that results into an R string vector.

Return Value

The StringArray representing the string vector.

RSetVector

Declaration

void RSetVector(string symbol, DoubleArray vector)

Description

Sets an R double vector to an R symbol.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
symbol The name of the symbol to set.
vector The double array to be set as double vector.

Return Value

Does not return a value.

RSetVector

Declaration

void RSetVector(string symbol, IntArray vector)

Description

Sets an R int vector to an R symbol.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
symbol The name of the symbol to set.
vector The IntArray to be set as int vector.

Return Value

Does not return a value.

RSetVector

Declaration

void RSetVector(string symbol, StringArray vector)

Description

Sets an R string vector to an R symbol.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
symbol The name of the symbol to set.
vector The StringArray to be set as string vector.

Return Value

Does not return a value.

RSetVector

Declaration

void RSetVector(RSession session, string symbol, DoubleArray vector)

Description

Sets an R double vector to an R symbol.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
session The session to an Rserve instance.
symbol The name of the symbol to set.
vector The double array to be set as double vector.

Return Value

Does not return a value.

RSetVector

Declaration

void RSetVector(RSession session, string symbol, IntArray vector)

Description

Sets an R int vector to an R symbol.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
session The session to an Rserve instance.
symbol The name of the symbol to set.
vector The IntArray to be set as int vector.

Return Value

Does not return a value.

RSetVector

Declaration

void RSetVector(RSession session, string symbol, StringArray vector)

Description

Sets an R string vector to an R symbol.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
session The session to an Rserve instance.
symbol The name of the symbol to set.
vector The StringArray to be set as string vector.

Return Value

Does not return a value.

RStartSession

Declaration

bool RStartSession()

Description

Starts a new session to run R commands.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters

The function has no parameters.

Return Value

True, if the session was started, false if anything failed.

RVoidEvaluate

Declaration

bool RVoidEvaluate(RSession session, string statement)

Description

Evaluates an R statement or a list of statements in a void context.

Supported Runtime Versions

3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
session The session to an Rserve instance.
statement The statement to evaluate. Multi-line statements have to be separated by carriage return and line feed.

Return Value

True, if the statement was executed. False, if a parse error occurred.

RVoidEvaluate

Declaration

bool RVoidEvaluate(RSession session, string statement, bool ignoreExceptions)

Description

Evaluates an R statement or a list of statements in a void context.

Supported Runtime Versions

3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
session The session to an Rserve instance.
statement The statement to evaluate. Multi-line statements have to be separated by carriage return and line feed.
ignoreExceptions If this flag is true, R exceptions will be ignored.

Return Value

True, if the statement was executed. False, if a parse error occurred.