Wish Christmas with R

This post is dedicated to all the R Lovers...Flaunt your knowledge of R programming in your peer group with the following code.
Wish Christmas with R

Method 1 : Run the following program and see what I mean -

paste(intToUtf8(acos(log(1))*180/pi-13),
toupper(substr(month.name[2],2,2)),
paste(rep(intToUtf8(acos(exp(0)/2)*180/pi+2^4+3*2),2), collapse = intToUtf8(0)),
LETTERS[5^(3-1)], intToUtf8(atan(1/sqrt(3))*180/pi+2),
toupper(substr(month.abb[10],2,2)),
intToUtf8(acos(log(1))*180/pi-(2*3^2)),
toupper(substr(month.name[4],3,4)),
intToUtf8(acos(exp(0)/2)*180/pi+2^4+3*2+1),
intToUtf8(acos(exp(0)/2)*180/pi+2^4+2*4),
intToUtf8(acos(log(1))*180/pi-13),
LETTERS[median(0:2)],
intToUtf8(atan(1/sqrt(3))*180/pi*3-7),
sep = intToUtf8(0)
)

Method 2 : Audio Wish for Christmas

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)

R Tutorials : 75 Free R Tutorials

About Author:

Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has over 7 years of experience in data science and predictive modeling. During his tenure, he has worked with global clients in various domains like banking, Telecom, HR and Health Insurance.

While I love having friends who agree, I only learn from those who don't.

Let's Get Connected: Email | LinkedIn

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
  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