R

Syntax

R(Period: IMsPeriod,
  Code: String,
  Inputs: Array)

Parameters

Period. Period, at which the method is calculated. If the parameter value is Null, the method is calculated at the entire time period.

Code. Expression for method calculation.

Inputs. Array of input variables.

Description

It transforms data using R package methods.

Comments

Integration with R must be set up in the repository to use this method. For details about integration setup see the How to Set Up Integration with R? section.

 Features of working with the Code parameter:

Example

Formula Result Application
= R(Setperiod("01.01.2000", "01.01.2015"), "Y <- X1 + 1;", {Chicago - population[t]})

Values of the Chicago - population[t] time series are increased by one using the R package.

It can be used in formulas of calculated series of time series database and in formulas of attribute-based models.
= R(SetPeriod("01.01.2000", "01.01.2015"), "Y <- X1 + 1;", X1, X2)

Value of the X1 variable is increased by one using the R package methods.

It can be used in model formulas of modeling container.

See also:

Functions Available in Expression Editor | R Methods | IModelling.R