This function creates a flow logger object that calculates metrics and logs
them into the console. The metrics definition are done very similarly to the
flow_stopper()
function (see its help page), but the formulas
are
divided into lists, each list being printed in a different line.
Arguments
- formulas_list
A list of
formulas
as inflow_stopper()
(a list of lists), except the RHS to be a function that takes the LHS value.m
and returns a single string to be printed.- log_each
An integer specifying the frequency of logging.
- sep
A character string used to concatenate logs associated with a list inside
formulas_list
.- args_alert, args_ul
A list of arguments passed to
cli::cli_alert()
andcli::cli_ul()
, the functions that format the console output.
Value
A "flow_logger"
-class object to be passed to optimize_phy()
.
Details
The LHS of the formulas are evaluated in the same way as in flow_stopper()
(see its help page), but the user only access the current results
(\(R_t\)). Additionally, any metric of the current iteration
(\(M_t\)) can be accessed by its name (if formulas
was named).