1
0
mirror of https://github.com/andre-wojtowicz/r-distributed-computing synced 2024-11-25 15:45:28 +01: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)
}