How to play sound at end of R Script

How to play sound at end of R Script, The R programming language is used to demonstrate how to terminate a code with a sound in this lesson.

Example 1: How to play sound at end of R Script

The beepr package can be used to create a beep at the conclusion of an R program. Installing and loading the package is the first step.

install.packages("beepr")  
library(beepr)

The beep() function is a part of the beepr package. The beep function can be used as follows with its default settings.

beep()                

Your machine will beep if you execute the prior R syntax.

Machine Learning Impact on your day-to-day life! » finnstats

Example 2: Different Sound Options.

The beep function offers a variety of noises that can be played at the conclusion or in between lines of R code.

The sound argument for the beep function only needs to be set to a specified value. For further details on the various noises, consult the beep command’s R help manual.

For instance, by setting the sound option to 15, we can play a treasured sound:

beep(sound = 15)              

Python is superior to R for writing quality codes » finnstats

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

6 + twenty =