0 votes
1 view
in R Programming by (5.3k points)

When I run R scripts I go do something else on a different desktop. If I don't check frequently, I never know when something is finished. Is there a way to invoke a beep (like a system beep) or get R to play a sound or notify growl via some code at the end of my script?

1 Answer

0 votes
by (25.4k points)

To play a sound at the end of a script, you can use the beep() function from the beepr package as follows:

install.packages("beepr")

library(beepr)

beep(1)

You can play different sounds just by passing different numbers as the beep function argument.i.e.,

beep(3)

beep(5)

beep(2)

beep(6)

beep(7)

beep(8)

beep(1)

beep(3)

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...