powered by
closelog(sessionInfo = TRUE)
sessionInfo
Logs are stored on a stack, and so when one is closed, logging output returns to the previous log (if any).
openlog
printlog
logfile <- openlog("A.log") printlog("message to A", flag = TRUE) logfile <- openlog("B.log") printlog("message to B") flagcountB <- closelog() flagcountA <- closelog(sessionInfo = FALSE)
Run the code above in your browser using DataLab