Skip to content

Instantly share code, notes, and snippets.

View zachguo's full-sized avatar

Zach Guo zachguo

View GitHub Profile
# "terminal-notifier" should be installed first
notify <- function(msg="Operation complete") {
in.osx <- (Sys.info()['sysname'] == "Darwin")
in.rstudio <- (Sys.getenv("RSTUDIO") == "1")
in.rgui <- (Sys.getenv("R_GUI_APP_REVISION") != "")
if (in.rstudio) { # hack to see if running in RStudio
title <- "RStudio"