Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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

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!

30.5k questions

32.5k answers

500 comments

108k users

Browse Categories

...