Wish Christmas with R


R Data Science: R Programming A-Z: R For Data Science With Real Exercises!

This post is dedicated to all the R Lovers...Flaunt your knowledge of R programming in your peer group with the following code and ask them to turn on computer speakers before running the code.
Wish Christmas with R

Turn on computer speakers before running the code.
install.packages("audio")
library(audio)
christmas_file <- tempfile()
download.file("https://sites.google.com/site/pocketecoworld/merrychristmas1.wav", christmas_file, mode = "wb")
xmas <- load.wave(christmas_file)
play(xmas)
Coursera Data Science

R Tutorials : 75 Free R Tutorials

Get Free Email Updates :
*Please confirm your email address by clicking on the link sent to your Email*

Related Posts:

8 Responses to "Wish Christmas with R"

  1. Hi!
    Thank you for the post!
    Although I had troubles running the code on R Studio Mac. Some error with the URL.
    Any thoughts?
    Merry Christmas!

    ReplyDelete
    Replies
    1. What's the error message? Merry Christmas! :-)

      Delete
  2. hi
    it is working supob, but can u please tell me how to play internal sons, like our movie songs, can u please share that

    ReplyDelete
  3. hi
    what happend bro. can u please reply me

    ReplyDelete
  4. Hi, Its throwing the following error-
    > library(audio)
    > christmas_file <- tempfile()
    > download.file("https://sites.google.com/site/pocketecoworld/merrychristmas1.wav", mode = "wb")
    Error in download.file("https://sites.google.com/site/pocketecoworld/merrychristmas1.wav", :
    argument "destfile" is missing, with no default
    > xmas <- load.wave(christmas_file)
    Error in load.wave(christmas_file) :
    unable to open file 'C:\Users\DOYEL~1.KAY\AppData\Local\Temp\RtmpiubV1u\file25fc3e74443a'
    > play(xmas)
    Error in play(xmas) : object 'xmas' not found
    >
    Pls help

    ReplyDelete
    Replies
    1. Hi doyel,

      connect the internet and try its once again its working ok.

      Delete
  5. i have this error... Error in play.default(x, rate, ...) : no audio drivers are available

    ReplyDelete
  6. ğŸŽ„ğŸŽ‰ğŸŽ†ğŸŽ‡ğŸŽˆğŸŽğŸŽŠ
    ğŸŽ¶

    ReplyDelete

Next → ← Prev