Learn R Programming

rkeops (version 1.4.2.2)

parse_extra_args: Parse formula for extra arguments not encoded in argument aliases

Description

FIXME

Usage

parse_extra_args(formula, args)

Value

a list with different information about formula input arguments: a list with different information about formula input arguments:

var_type

vector of text string, corresponding type of formula arguments (among Vi, Vj, Pm).

var_pos

vector of integer, corresponding arguments positions.

var_dim

vector of integer, corresponding arguments dimensions.

Arguments

formula

text string, an operator formula (see Details).

args

vector of text string, formula input arguments (see Details).

Author

Ghislain Durif

Details

Parse the formula for string such as

  • "YY(<pos>,<dim>)" where YY can be a formula input argument type (Vi, Vj or Pm), <pos> is the position of the corresponding input argument, and <dim> its inner dimension.

  • "Var(<pos>,<dim>,<type>)" where <pos> and <dim> are the position and inner dimension (c.f. previous point) and <type> is an integer encoding the formula input argument type with the following relation:

|---------|-------------------------|-----------| | keyword | meaning | type | |---------|-------------------------|-----------| | Vi | variable indexed by i | 0 | | Vj | variable indexed by j | 1 | | Pm | parameter | 2 | |---------|-------------------------|-----------|