beep() function in R Language is used to make a beep sound in R language.
In this article, we will be studying more about this function how to implement it, its applications, and some of the different ways to use this function.
Example 1: Play a beep sound
This will play a ping sound.
Here in the above code, we have installed the
beepr packages for
beep() functions and then created a beep sound of ping.
If we do not choose any parameter the sound will be 1 which is ping.
Example 2: Play specific Sound
Here in the above code, we have specified 5 with the beep function so it will play a treasure sound.
Example 3: Play random Sound
Here in the above code, we have specified 0 with the beep function which means the function will play any random sound.
- This beep sound can be used at any errors.
- These sounds can be used on the success of a program.
- These sounds can be used as a failure of a program.
- These sounds can be s=used as the completion of any program.