Notification when R finishes running?
===

While waiting for R to finish a 5-10 minute job, I might start writing (at best), although I would like to get back to the analysis promptly upon completion. 

What options do I have to be notified when R completes an analysis on localhost?

For example, could I have it ring a bell, open a popup window, send an email?

I can imagine infinite possibilities just adding `system()` to the end of the code, but is there another option?

For the record, I generally use R interactively in `Emacs ESS`, but also use `R CMD Sweave` and `R --vanilla <` from the command-line.