-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathamusing_R_packages.R
More file actions
86 lines (57 loc) · 1.77 KB
/
amusing_R_packages.R
File metadata and controls
86 lines (57 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# beepr -------------------------------------------------------------------
# Easily play notification sounds
# https://github.com/rasmusab/beepr
# install beepr
install.packages("beepr")
library(beepr)
# sound options available in beepr:
# 1. "ping"
# 2. "coin"
# 3."fanfare"
# 4. "complete"
# 5. "treasure"
# 6. "ready"
# 7. "shotgun"
# 8. "mario"
# 9."wilhelm"
# 10. "facebook"
# 11. "sword"
# play fanfare sound. Specify sound number or name.
beepr::beep(3)
beepr::beep("fanfare")
# play a random sound
beepr::beep(0)
# BRRR --------------------------------------------------------------------
# Inspired by beepr - play iconic sounds from rap artists
# https://github.com/brooke-watson/BRRR
# install BRRR
if(!require(devtools)) {install.packages("devtools")}
devtools::install_github("brooke-watson/BRRR")
library(BRRR)
# list the number and name of all available sounds
BRRR::skrrrahh_list()
# iteratively play the sounds available in the BRRR package
for(i in 1:52){
print(BRRR::skrrrahh_list()[i])
BRRR::skrrrahh(i)
Sys.sleep(2)
}
# My favorites are definitely Lil Jon #36 and #37
BRRR::skrrrahh(36)
BRRR::skrrrahh(37)
BRRR::skrrrahh(23)
# Catterplot --------------------------------------------------------------
# https://github.com/Gibbsdavidl/CatterPlots
# install Catterplot
#install_github("Gibbsdavidl/CatterPlots")
library(CatterPlots)
x <- -10:10
y <- -x^2 + 10
# make a rainbow parabola with Nyan Cat
rainbowCats(x, y, yspread=0.05, xspread=0.05, ptsize=2, catshiftx=0.5, catshifty=-0.2, canvas=c(-0.5,1.5,-1,1.5))
# fortunes ---------------------------------------------------------------
# https://cran.r-project.org/web/packages/fortunes/index.html
# get a fortune from the R community
install.packages("fortunes")
library(fortunes)
fortune()