Making R “BEEP”

I started noticing the beep after an interactive command finish in STATA (I think this is only a Mac specific feature). In STATA, you get a “beep” when the command finish running and you are working in other programs. Some commands take some times to finish, and it is nice to have that feature.

In R, if you want it to beep, some options are “alarm() function”, which is pretty much “cat(“\a”)” . You can make R tweet, too (see

I think I’d rather go with something simple like cat(“\a”).
But, there are lots of comments about “\a” not working unless you have a speaker turned on. So, make sure your computer has a speaker, though.

If you are running a script in Linux, you can use a command to send mail at the end of your R script — something like

system(‘mail -s “Job finished” < logfile’)

[I haven’t tested it out though]… Do you have any other ideas?


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.