/logr

R logging package for parallel computing

Primary LanguageR

logr: R logging package for parallel computing

Installation

library(devtools)
install_github('huashan/logr')

demo code

do_thread <- function(x, loger) {
   loger$loginfoT(x)
}

loger <- logr$new()

# start clustering
# mcStart()

foreach(j = 1:6, .packages = 'logr') %dopar% do_thread(j, loger)

# stop clustering
# mcEnd()

rm(loger);gc(T)