runFunction: General functions to run a function of an Rstox package,...

View source: R/API.R

runFunctionR Documentation

General functions to run a function of an Rstox package, modeled by do.call().

Description

runFunction runs a function using the do.call syntax, whereas runFunction.JSON accepts a JSON string conntaining the parameters to pass on to runFunction.

Usage

runFunction(
  what,
  args,
  package = "RstoxFramework",
  removeCall = TRUE,
  onlyStoxMessages = TRUE,
  onlyStoxWarnings = TRUE,
  onlyStoxErrors = FALSE,
  maxLength.Message = 2000,
  maxLength.Warning = 2000,
  maxLength.Error = 2000,
  nwarnings = 10000,
  collapseMessages = TRUE,
  collapseWarnings = TRUE,
  collapseErrors = TRUE,
  messageLogFile = NULL,
  warningLogFile = NULL,
  errorLogFile = NULL,
  messageAppend = FALSE,
  warningAppend = FALSE,
  errorAppend = FALSE,
  uniquify = TRUE,
  header = "> "
)

runFunction.JSON(cmd)

Arguments

what

either a function or a non-empty character string naming the function to be called.

args

a list of arguments to the function call. The names attribute of args gives the argument names.

package

The name of the package holding the function given by what.

removeCall

Logical: If FALSE, keep the call in the error message.

onlyStoxMessages

Logical: If TRUE show only the StoX messages, which are those starting with "StoX: ".

onlyStoxWarnings

Logical: If TRUE show only the StoX warnings, which are those starting with "StoX: ".

onlyStoxErrors

Logical: If TRUE show only the StoX errors, which are those starting with "StoX: ".

maxLength.Message, maxLength.Warning, maxLength.Error

The maximum number of characters to return for messages, warnings and errors, respectively (with allowed values 100...8170, default 1000).

nwarnings

The number of warnings to save.

collapseMessages, collapseWarnings, collapseErrors

Logical: If TRUE report only unique messages, warnings and errors, respectively, adding the number of occurrences in parenthesis.

messageLogFile, warningLogFile, errorLogFile

If given, messages, warnings and errors are printed to these files.

messageAppend, warningAppend, errorAppend

Logical: If TRUE, append to the log files (messageLogFile, warningLogFile or errorLogFile, respectively)

uniquify

Logical: If TRUE (the default) return unique messages, warnings and errors, with the nnumber of occurrences in parenthesis.

header

The string to start each line with.

cmd

A JSON string containing parameters listed above.


StoXProject/RstoxFramework documentation built on Oct. 17, 2023, 1:24 p.m.