1
0
mirror of https://github.com/andre-wojtowicz/r-distributed-computing synced 2024-07-22 07:35:31 +02:00
r-distributed-computing/utils.R

27 lines
428 B
R

# additional functions
setup.logger = function(output.file, overwrite.existing.files)
{
if (overwrite.existing.files & file.exists(output.file))
{
file.remove(output.file)
}
invisible(flog.appender(appender.tee(output.file)))
}
stop.script = function(error)
{
if (is.character(error))
{
flog.error(error)
} else {
flog.error(getMessage(error))
}
throw(error)
}