.

# 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()
play(xmas)

Views: 1390

Comment

Join Data Science Central

Comment by Jerry Czarzasty on December 27, 2017 at 8:22am

This is great Deepanshu. I am a beginner in R and was trying to adopt your code to New Year's wishes. What is wrong with my code below? I am getting error in load.wave(newyears_file) : incomplete file...

install.packages("audio")
library(audio)
newyears_file <- tempfile()