This function allows to embed a analysis made by a function, so that log information can be saved in a consistent way, messages can be sent depending on the parameter verbose.

add_log_info(x, fun, info, journal, verbose, verification, level = 1, ...)

Arguments

x

data to be adapted.

fun

function, the analysis that may performed on x.

info

list, gives the name of the step both in 'short' and 'long' terms.

journal

either FALSE, if not must be a character of length one, and will be interpreted at the log file where to save any log information. Its format should be in '.log' in order to create also a '-log.csv' log file that will store information on time and any given verification in csv format.

verbose

logical, should the some messages be sent in real time.

verification

expression, a simple treatment that will be added to *log.csv, may be missing.

level

integer, the number of tabulation that will be added to the message.

...

anything that may be needed by fun.

Value

x transformed by fun

Author

Frédéric Grelot