Garrett Catlin

August 11, 2022

BrowseURL() is Objectively Superior to beepr::beep() in R

In R, a fun and short way to bring yourself a little joy is to use BrowseURL() in interesting ways. Mainly, I like to use it in place of beepr::beep() by browsing a YouTube URL. Ultimately, the goal is to have a notification when an expensive task is done processing:

# Run as block
for (i in 1:100) {
  message(i)
}

browseURL("https://www.youtube.com/watch?v=dQw4w9WgXcQ")

One caveat to this is that it doesn't work with all browsers (i.e., Chrome will auto play YouTube videos whereas Firefox won't at the time of this writing). However, if your default browser does auto play YouTube videos, I find this superior to beepr::beep() for a couple of reasons:

  1. It will not only start playing audio but it will also make your browser pop up on your screen, so it's both a good audio and visual indicator.
  2. If using YouTube and the "Autoplay Next Video" setting is on, your computer will continue to alert you that your task has been finished using YT's autoplay algorithm. This is helpful if the task was completed and you were away from your machine.

The link above is my go to for obvious reasons, but I'm sure you can think of something better! :)

Screen Shot 2022-08-11 at 2.28.24 PM.png


- Garrett C.
catlin@hey.com

About Garrett Catlin

Your friendly neighborhood data scientist.