1
0
mirror of https://github.com/andre-wojtowicz/r-distributed-computing synced 2024-11-03 14:10:28 +01:00
r-distributed-computing/utils.R

27 lines
428 B
R
Raw Normal View History

2016-11-08 13:49:28 +01:00
# 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)
}