st2arma: Translate an elementary R statement to RcppArmadillo

View source: R/rex2arma.inc.R

st2armaR Documentation

Translate an elementary R statement to RcppArmadillo

Description

Translate an elementary R statement to RcppArmadillo

Usage

st2arma(
  st,
  call2arma = call2a,
  indent = "",
  iftern = FALSE,
  env = parent.frame(),
  ...
)

Arguments

st

A statement to transalte

call2arma

An environment used as modifiable dictionary and giving Armadillo equivalence for some R functions. Entries are R function names to be translated.

indent

A character string used as indentation. It is incremented by " " (3 spaces) inside a {...} block.

iftern

A logical indicating whether if/else must be considered as a ternary operator (TRUE) or as a classical if/else operator (FALSE).

env

An environment where statement may be executed.

...

Parameters passed through to symdim() calls.

Details

Parameter env is also passed to symdim() with .... translate statement to arma code

Value

A string with RcppArmadillo code.


sgsokol/rex2arma documentation built on May 5, 2023, 12:07 a.m.