Skip to content

Commit 366bfe2

Browse files
committedSep 24, 2014
Adding R implementation
1 parent 85c94a6 commit 366bfe2

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed
 

‎README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ This ASCII representation is a cartoon mascot at [Cerner Engineering](http://eng
4545
* [bash](https://www.gnu.org/software/bash/manual/) - [art.sh](bash/art.sh) (`bash art.sh`)
4646
* [python](https://docs.python.org/3/) - [art.py](python/art.py) (`python art.py`)
4747
* [lua](http://www.lua.org/) - [art.lua](lua/art.lua) (`lua art.lua`)
48-
* [clojure](http://clojure.org/) - [art.clj](clojure/art.clj) (`java -cp clojure.jar clojure.main art.clj`)
48+
* [clojure](http://clojure.org/) - [art.clj](clojure/art.clj) (`java -cp clojure.jar clojure.main art.clj`)
49+
* [r](http://www.r-project.org/) - [art.r](r/art.r) (`Rscript art.r`)

‎art/alan.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
___
22
| __)
3-
.l: .cl. 'l: :l. cl. ____ |__ \
3+
.l: .cl. 'l: :l. cl. ____ |__ \
44
.lollddllddoldxlcdkxookc (___ \ (___/
55
.lkkl,;oo,,ld:,:do,;dd;:Kk __) )
66
,XXc,,,;,,,,;,,,;,,,;;,:Kk / __/
@@ -27,4 +27,4 @@
2727
:odo:::::cxx:;;:xx::::::dol;
2828
.oloo:::::ckx;' .0Kc::::::c0d
2929
'XKOOOOOOOd'. .0XOkkkkkkOXx
30-
.''''';lllllllllc''''''',lllllllllll;
30+
.''''';lllllllllc''''''',lllllllllll;

‎r/art.r

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# art.r
2+
# "2 to the 5th" programming competition @ engineering.cerner.com
3+
#
4+
# Read in the ASCII art file and simply print it to the console.
5+
# Note: This assumes you are executing "Rscript art.r" in the current
6+
# working directory.
7+
file = file("../art/alan.txt", open = "r")
8+
lines = readLines(file)
9+
for (i in 1 : length(lines)) {
10+
cat(lines[i], sep = "\n", labels = NULL)
11+
}
12+
close(file)

0 commit comments

Comments
 (0)
Please sign in to comment.