Popup notification from R on Windows

After R is done running a long data crunching process, you may need to notify the operator to check the R console and provide the next commands. Without installing any more software or creating any batch files or VBS scripts, here is a simple way to create the popup notice in Windows:

system('CMD /C "ECHO The R process has finished running && PAUSE"', 
   invisible=FALSE, wait=FALSE)

R will launch a command prompt window with the message (which can be customized, of course), and the notice stays open until manually closed.

This trick was adapted for R from Dave Webb on stackoverflow.com.

Tested with R 2.15.2 and R 3.0.0 on Windows 7.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s