Power R - Data360_Analyze - 3 - 3.12

Data360 Analyze Server Help

Product type
Software
Portfolio
Verify
Product family
Data360
Product
Data360 Analyze
Version
3.12
Language
English
Product name
Data360 Analyze
Title
Data360 Analyze Server Help
Copyright
2023
First publish date
2016

Runs an R Script on the embedded R engine.

When an input to the Data360 Analyze Power R node comprises multiple records the node will, when run, read in all input data records and pass them to the embedded R engine as a single data frame. This data frame will be processed in a single execution of the engine. Where the Data360 Analyze Power R node is required to process individual records serially, the data flow should incorporate the Data360 Analyze Power R node within a sub data flow and execute one or more times using the Data360 Analyze looping functionality, see Creating run dependencies.

Powered by TIBCO®.

Note: An additional Power R node pack license is required to run the Power R node. See Applying a node pack license.This node processes data in-memory. Additional RAM will be required when processing data sets with a large volume of data.

Properties

RScriptInputPinName

Optionally specify the type of value contained in the RScript property.

If not specified, the value of the RScript property is a Literal comprising the R Script to be run. The value of this property is a constant for all input records.

If specified, the value of this property is the name of the input pin that contains the R Script to be run (e.g. "in1"). In this case, the RScript property must also be specified and its value set to the field on the input ("in1") that contains the R Script. Values for this property are read from the input field for each input record.

RScript

The meaning of this property depends on whether the RScriptInputPinName property is set.

If the RScriptInputPinName property is not set, the contents of this property are used as the R Script to be run by the node. The value is treated as a Literal and is used for all input records.

If the RScriptInputPinName property is set, this property contains the name of the field on the input pin (identified by the RScriptInputPinName property) that contains the R Script to be run by the node. Values for this property are read from the input field for each input record.

A value is required for this property.

ExportStringCoercion

Optionally specify how character vectors are exported from the embedded R engine to Data360 Analyze.

It represents all string values in data frames as character vectors or factors, both of which are implemented by Unicode strings. By contrast, Data360 Analyze has two field types for this class: string and Unicode. Unicode can contain all characters while string can only hold a subset (technically, only those found in the Data360 Analyze server's code page).

Therefore, if the exported data has characters that aren't in the Data360 Analyze's code page - usually fancy characters or notations - it is important to set this property to To Unicode to avoid errors when outputting the data. Selecting To String, by contrast, will result in the node failing when these special characters are present. Therefore, "To String" should only be chosen if the user is certain that all characters in the output data frames are in the Data360 Analyze's code page. Optional property.

The default value is To Unicode.

ExportDoubleCoercion

Optionally specify how double vectors are exported from the embedded R engine to Data360 Analyze. Data360 Analyze uses three field types for numbers: int, double, and long. The two options, To Long and To Double, specify which field type the node will try to create for the exported double vectors. If To Double is selected, the values will be exported without conversion. If To Long is selected, values will be rounded as long as they are within Epsilon of the nearest integer.

However, if values exist that are too far away to be rounded, or that are larger than Long.MAX_ VALUE or smaller than Long.MIN_VALUE, the node will fail with an error. Optional property.

The default value is To Double.

InvalidOutputBehavior

Optionally specify how the node reacts if the variables named after output pins do not exist in the embedded R engine workspace or if they are not of class "data.frame". The node will check if each output variable is defined before exporting them. If the matching variable is of class data.frame, then it will attempt to write out all records found in the data frame. If either a variable of a given output pin's name is not found or if that variable does not point to a data frame, then the behavior of this node depends on this property. If this property is set to Error, the node will log an error and fail the node. Log will cause the node to simply log a warning and continue running. Ignore will not report any problem.

The default value is Error.

Epsilon

Optionally specify a decimal tolerance for rounding doubles to longs as described above. If ExportDoubleCoercion is set to To Long, then double values will be rounded to the nearest integer if the distance between the two values is less than or equal to Epsilon.

The default value is "0.0"; in other words, the node will only convert exact integers.

ImportStringCoercion

Optionally specify how the embedded R engine converts string and Unicode input fields when moving data into R. By default, the embedded R engine converts Data360 Analyze string and Unicode values into characters when creating data frames. Factors take a limited amount of values and are stored as integer vectors, which map to characters when being displayed. They can be used in a variety of modeling functions, but sometimes it is more convenient for strings to simply stay strings and not be converted. The options for this variable, To Character and To Factor, determine whether the data frames convert character vectors to factors or leave them as characters.

The default value is To Character.

ImportIntCoercion

Optionally specify how the embedded R engine converts Int input fields when moving data into R. By default, the embedded R engine converts Data360 Analyze Integer values into integer R class when creating data frames. The Value -2147483648 is valid for Data360 Analyze but is invalid in the R environment.

To avoid this it is possible to coerce the data type to numeric.

The default value is To Integer.

Inputs and outputs

Inputs: Multiple optional.

Outputs: Multiple optional.