Learn R Programming

ubiquity (version 2.1.0)

find_bracketed_arguments: Parse Prototype Functions for Arguments

Description

Parses strings to find abstract functions (of the format SIFUNC[ARG1][ARG2][ARG3] and extract the arguments from that function and replace it with actual functions and any additional arguments needed

Usage

find_bracketed_arguments(str, pattern, replace = "", narg, op = "[", cp = "]")

Value

string containing the actual function call/code built from the prototype function

Arguments

str

string containing the prototype function call

pattern

string indicating the start of the function eg. "SI_TT_BOLUS["

replace

string to replace pattern with

narg

number of arguments to prototype function

op

string used to indicating open parenthesis

cp

string used to indicating close parenthesis