1. はじめに
cowsay
は、CLIにASCIIアートを描いてくれるパッケージのようです。
2. インストール
CRANからインストールできます。
install.packages("cowsay")
3. つかってみる
こんな動物が描けるらしいです。
sort(names(animals))
> sort(names(animals))
[1] "ant" "anxiouscat" "bat" "bat2" "behindcat" "bigcat"
[7] "buffalo" "cat" "chicken" "chuck" "clippy" "cow"
[13] "daemon" "duck" "duckling" "egret" "endlesshorse" "facecat"
[19] "fish" "frog" "ghost" "grumpycat" "hypnotoad" "longcat"
[25] "longtailcat" "monkey" "mushroom" "owl" "pig" "poop"
[31] "pumpkin" "rabbit" "shark" "shortcat" "signbunny" "smallcat"
[37] "snowman" "spider" "squirrel" "squirrel2" "stretchycat" "trilobite"
[43] "turkey" "yoda"
say('time')
> say('time')
--------------
2021-08-20 07:03:12
--------------
\
\
\
|\___/|
==) ^Y^ (==
\ ^ /
)=*=(
/ \
| |
/| | | |\
\| | |_|/\
jgs //_// ___/
\_)
say('Q: What do you call a single buffalo?\nA: A buffalonely', by='buffalo')
> say('Q: What do you call a single buffalo?\nA: A buffalonely', by='buffalo')
--------------
Q: What do you call a single buffalo?
A: A buffalonely
--------------
\
\
\
_.-````'-,_
_,.,_ ,-'` `'-.,_
/) ( '``-.
(( ) ) `\
\) (_/ )\
| /) ' ,' / \
`\ ^' ' ( / ))
| _/\ , / ,,`\ ( "`
\Y, | \ \ | ````| / \_ \
`)_/ \ \ ) ( > ( >
\( \( |/ |/
mic & dwb /_(/_( /_( /_(
4. さいごに
いろいろあって、面白いです。