ACTUALIZAR:
Con macOS 10.9 (Mavericks) y versiones posteriores, puede publicar notificaciones usando AppleScript simple:
theTitle <- "A Title"
theMsg <- "A message here"
cmd <- paste("osascript -e ", "'display notification ", '"', theMsg, '"', ' with title ', '"', theTitle, '"', "'", sep='')
system(cmd)
Esto elimina la necesidad de instalar terminal-notifier, a la que se hace referencia a continuación.
-
Tengo instalado un terminal-notificador en mi Mac para recibir notificaciones de escritorio desde la línea de comandos. Luego puede finalizar una llamada al system()comando como este (cambiar la ruta, obviamente):
notify <- function(msgString='Message from R', titleString='Message from R', speakIt=FALSE) {
cmd <- paste('~/terminal-notifier/terminal-notifier.app/Contents/MacOS/terminal-notifier -message ', '"', msgString, '" -title "', titleString, '"', sep='')
system(cmd)
if (speakIt) {
system(paste('say', msgString))
}
}
Puedes llamar a la función así
notify("R is done", "Message from R", speakIt=TRUE)
para recibir un mensaje como este:

Actualización: Incluye el saycomando @ VLC .