• Stars
    star
    266
  • Rank 153,330 (Top 4 %)
  • Language
    HTML
  • License
    Other
  • Created almost 11 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

cowsay w/ more animals, in R

cowsay

cran checks R-check codecov rstudio mirror downloads cran version

What is this?

If you are familiar with cowsay on the cli, then you know what this is, but for R. If not, read below. Why? Why not?

Contributors (alphabetical)

  • Amanda Dobbyn
  • Andreas Brandmaier
  • Andy Teucher
  • Carson Sievert
  • Franz-Sebastian Krah
  • Guangchuang Yu
  • Karl Broman
  • Kiyoko Gotanda
  • Lucy D’Agostino McGowan
  • Marion Louveaux
  • Noam Ross
  • Paolo Sonego
  • Philipp Boersch-Supan
  • Rich FitzJohn
  • Scott Chamberlain
  • Thomas Leeper
  • Tyler Rinker

That’s right, it takes 17 people to make cowsay - it’s that hard.

Contributing

See CONTRIBUTING.md

Where to find ASCII animal art

Sources to look in:

Permissions

In the ascii art mailing list https://groups.google.com/forum/#!forum/alt.ascii-art they say:

 As for posting other people's ASCII art,
    after a discussion in news:alt.ascii-art       _     ___
    the following rules were agreed upon:         #_~`--'__ `===-,
    1.  If an ASCII ART picture has initials      `.`.     `#.,//
        on it, leave them on when posting it      ,_\_\     ## #\
    2.  If an ASCII ART picture doesn't have      `__.__    `####\
        initials on it,  mention  that  you            ~~\ ,###'~
        didn't  draw  it  when  posting  it.              \##'
    3.  If somebody  posts a picture without                  [nosig]
        initials and you have an original copy
        with initials on, feel free to re-post the original version.
        *   The re-post ought not to be taken personally, as we all
            know that ASCII art often loses proper credits.
            Responses to the re-post are not necessary.

    One contributor, name of Krogg, suggested the following:

    1.) Ultra polite:...ya make yer own ascii and use it.
    2.)  Very polite:...Ya contact the author and ask if ya
                        can use it...
    3.)       polite:...Ya use it but you keep the Credits
                        in there like they should be.
    4.)         rude:...Ya use it and strip credits.
    5.)    Very rude:...Ya use it and claim that it Is
                        _Your_ very own creation...

So, let’s go with this rule: Let’s include found (on the web) ascii art in this pkg, include signature if there, and if no signature, put in a [nosig] (see above).

Quick watch start

Asciicast: https://asciinema.org/a/7745

Install

From CRAN

install.packages("cowsay")

Dev version

remotes::install_github("sckott/cowsay")

library("cowsay")

The animals

sort(names(animals))
#>  [1] "alligator"    "ant"          "anxiouscat"   "bat"          "bat2"        
#>  [6] "behindcat"    "bigcat"       "buffalo"      "cat"          "chicken"     
#> [11] "chuck"        "clippy"       "cow"          "daemon"       "duck"        
#> [16] "duckling"     "egret"        "endlesshorse" "facecat"      "fish"        
#> [21] "frog"         "ghost"        "goldfish"     "grumpycat"    "hypnotoad"   
#> [26] "longcat"      "longtailcat"  "monkey"       "mushroom"     "owl"         
#> [31] "pig"          "poop"         "pumpkin"      "rabbit"       "shark"       
#> [36] "shortcat"     "signbunny"    "smallcat"     "snowman"      "spider"      
#> [41] "squirrel"     "squirrel2"    "stegosaurus"  "stretchycat"  "trilobite"   
#> [46] "turkey"       "whale"        "wolf"         "yoda"

Say Something

say('time')
#> 
#>  -------------- 
#> 2023-03-06 12:53:45 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

say("ain't that some shit", "chicken")
#> 
#>  ----- 
#> ain't that some shit 
#>  ------ 
#>     \   
#>      \
#>          _
#>        _/ }
#>       `>' \
#>       `|   \
#>        |   /'-.     .-.
#>         \'     ';`--' .'
#>          \'.    `'-./
#>           '.`-..-;`
#>             `;-..'
#>             _| _|
#>             /` /` [nosig]
#> 

Add some color:

library(multicolor)
library(crayon)

say("boo!", "ghost", 
    what_color = "cyan", by_color = "saddlebrown")

ghost

say("I love hooo you are!", "owl", 
    what_color = rgb(0, 1, 1), by_color = "#FF0000")

owl

String styles together crayon-style:

say(what = "rms", by = "rms", 
        what_color = yellow$bgMagenta$bold,
        by_color = cyan$italic)

rms

This doesn’t preclude you from adding extra crayon colors to your what string directly.

say(what = paste0("hello ", crayon::yellow("there "), crayon::underline("world")), 
    by = "trilobite", 
    what_color = bgBlue$cyan$italic,
    by_color = "thistle")  # Don't ask me why "thistle" is pink/purple

trilobite

Multiple colors are also possible (uses the multicolor package):

say(what = "I'm a rare Irish buffalo",
    by = "buffalo", 
    what_color = c("salmon2", "darkcyan", "salmon2", "darkcyan"),
    by_color = c("green", "white", "orange"))

irish_buffalo

Vary type of output, default calls message()

say("hell no!")
#> 
#>  -------------- 
#> hell no! 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

say("hell no!", type="warning")
#> Warning in say("hell no!", type = "warning"): 
#>  -------------- 
#> hell no! 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

say("hell no!", type="string")
#> [1] "\n -------------- \nhell no! \n --------------\n    \\\n      \\\n        \\\n            |\\___/|\n          ==) ^Y^ (==\n            \\  ^  /\n             )=*=(\n            /     \\\n            |     |\n           /| | | |\\\n           \\| | |_|/\\\n      jgs  //_// ___/\n               \\_)\n  "

Catfacts!!!!

From the catfacts API at https://catfact.ninja

say("catfact", "cat")
#> --------------
#> When a domestic cat goes after mice, about 1 pounce in 3 results in a catch.
#> --------------
#>    \
#>      \
#>        \
#>            |\___/|
#>          ==) ^Y^ (==
#>            \  ^  /
#>             )=*=(
#>            /     \
#>            |     |
#>           /| | | |\
#>           \| | |_|/\
#>      jgs  //_// ___/
#>               \_)

Long cat

From the a Boing Boing tweet on 2014-05-10

say("it's caturday", "longcat")
#> 
#>  ----- 
#> it's caturday 
#>  ------ 
#>     \   
#>      \
#>     .ハ,,ハ
#>     ( ゚ω゚)
#>     |つ  つ
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     U "  U
#>         [BoingBoing]
#> 

Grumpy cat

say('NO!', by='grumpycat')
#> 
#>  -------------- 
#> NO! 
#>  --------------
#>     \
#>       \
#>         \
#>       ハ _ ハ
#>       ಠ X ಠ
#> 

say('WOKE UP TODAY, IT WAS TERRIBLE', by='grumpycat')
#> 
#>  -------------- 
#> WOKE UP TODAY, IT WAS TERRIBLE 
#>  --------------
#>     \
#>       \
#>         \
#>       ハ _ ハ
#>       ಠ X ಠ
#> 

say('I HAD FUN ONCE, IT WAS AWFUL', by='grumpycat')
#> 
#>  -------------- 
#> I HAD FUN ONCE, IT WAS AWFUL 
#>  --------------
#>     \
#>       \
#>         \
#>       ハ _ ハ
#>       ಠ X ಠ
#> 

Bunny Holding a sign

say(by='signbunny')
#> 
#>  -------------- 
#> Hello world! 
#>  --------------
#> (\__/) ||
#> (•ㅅ•) ||
#> /   づ
#>           [nosig]
#> 

Fish

say(by='fish')
#> 
#>  ----- 
#> Hello world! 
#>  ------ 
#>     \   
#>      \
#>   ><((((º>  ><((((º>  ><((((º>  ><((((º>  ><((((º>
#>       Kiyoko Gotanda
#> 

R fortunes

say('fortune','cat')
#> 
#>  -------------- 
#> Michael Watson: Hopefully this one isn't in the manual or I am about to get shot :-S
#> Peter Dalgaard: *Kapow*...
#>  Michael Watson and Peter Dalgaard
#>  question on axis()
#>  R-help
#>  February 2006 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

You can also pick a particular fortune by number or regex search - if the fortune parameter is not NULL you don’t have pass anything to the what parameter (the 1st parameter)

say(fortune=100)
#> 
#>  -------------- 
#> I'm not sure I'd trust any computer recommendation from 1976, no matter how famous the authors are.
#>  Peter Dalgaard
#>  after Samuel Edward Kemp cited a recommendation about nonlinear least squares computer programs from 'Box-Jenkins, 1976'
#>  R-help
#>  January 2005 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

say(fortune='whatever')
#> 
#>  -------------- 
#> Justin: Is there a function that just does whatever I'm thinking (aka whatever my homework question is...)?
#> Joshua Ulrich: That's the magic_pony function.
#>  Justin and Joshua Ulrich
#>  stackoverflow.com
#>  June 2013 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

Trilobite

say("Hi there :)", by='trilobite')
#> 
#>  -------------- 
#> Hi there :) 
#>  --------------
#>     \
#>       \
#>         \
#>           _____
#>        .'` ,-. `'.
#>       /   ([ ])   \
#>      /.-""`(`)`""-.\
#>       <'```(.)```'>
#>       <'```(.)```'>
#>        <'``(.)``'>
#>    sk   <``\_/``>
#>          `'---'`
#> 

Shark

say('Q: What do you call a solitary shark\nA: A lone shark', by='shark')
#> 
#>  -------------- 
#> Q: What do you call a solitary shark
#> A: A lone shark 
#>  --------------
#>     \
#>       \
#>         \
#>               /""-._
#>               .       '-,
#>                :          '',
#>                 ;      *     '.
#>                  ' *         () '.
#>                    \               \
#>                     \      _.---.._ '.
#>                     :  .' _.--''-''  \ ,'
#>         .._           '/.'             . ;
#>         ; `-.          ,                \'
#>          ;   `,         ;              ._\
#>           ;    \     _,-'                ''--._
#>           :    \_,-'                          '-._
#>           \ ,-'                       .          '-._
#>           .'         __.-'';            \...,__       '.
#>         .'      _,-'        \              \   ''--.,__  '\
#>         /    _,--' ;         \              ;           \^.}
#>         ;_,-' )     \  )\      )            ;
#>              /       \/  \_.,-'             ;
#>             /                              ;
#>          ,-'  _,-'''-.    ,-.,            ;      PFA
#>       ,-' _.-'        \  /    |/'-._...--'
#>      :--``             )/
#>   '
#> 

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  /_(/_(    /_(  /_(
#> 

Clippy

say(fortune=59, by="clippy")
#> 
#> 
#>  ----- 
#> Let's not kid ourselves: the most widely used piece of software for statistics is Excel.
#>  Brian D. Ripley
#>  'Statistical Methods Need Software: A View of Statistical Computing'
#>  Opening lecture RSS 2002, Plymouth
#>  September 2002 
#>  ------ 
#>     \   
#>      \   __
#>    / \
#>    | |
#>    @ @
#>   || ||
#>   || ||
#>   |\_/|
#>   \___/ GB

Yoda

say("fortune", by = "yoda")

Bats!

say("hi, i'm a bat", by="bat")
#> 
#>  ------------- 
#> hi, i'm a bat 
#>  -------------- 
#>               \   
#>                \  
#>                 \
#>         __.--'\     \.__./     /'--.__
#>     _.-'       '.__.'    '.__.'       '-._
#>   .'                                      '.
#>  /                                          \
#> |                                            |
#> |                                            |
#>  \         .---.              .---.         /
#>   '._    .'     '.''.    .''.'     '.    _.'
#>      '-./            \  /           \.-'
#>                       ''mrf

See also bat2

Monkey!

say("fortune", by = "monkey")
#> 
#>  ------------- 
#> Getting flamed for asking dumb questions on a public mailing list is all part of growing up and being a man/woman.
#>  Michael Watson
#>  in a discussion on whether answers on R-help should be more polite
#>  R-help
#>  December 2004 
#>  -------------- 
#>               \   
#>                \  
#>                 \
#> 
#>                   .="=.
#>                 _/.-.-.\_     _
#>                ( ( o o ) )    ))
#>                 |/  "  \|    //
#>                  \'---'/    //
#>            jgs   /`"""`\\  ((
#>                 / /_,_\ \\  \\
#>                 \_\_'__/  \  ))
#>                 /`  /`~\   |//
#>                /   /    \  /
#>           ,--`,--'\/\    /
#>           '-- "--'  '--'

Daemon!

say("fortune", by = "daemon")
#> 
#>  ----- 
#> I quit using SAS in 1991 because my productivity jumped at least 20% within one month of using S-Plus.
#>  Frank Harrell
#>  R-help
#>  November 2003 
#>  ------ 
#>     \   
#>      \  
#>       \
#>             ,        ,
#>            /(        )`
#>            \ \___   / |
#>             /- _  `-/  '
#>            (/\/ \ \   /\
#>            / /   | `    
#>            O O   ) /    |
#>            `-^--'`<     '
#>           (_.)  _  )   /
#>            `.___/`    /
#>              `-----' /
#> <----.     __ / __   \
#> <----|====O)))==) \) /====
#> <----'    `--' `.__,' \
#>              |        |
#>               \       /
#>         ______( (_  / \______
#>       ,'  ,-----'   |        \
#>       `--{__________)        \/ [nosig]

Egret

say("je ne regrette rien", by = "egret")
#> 
#>  ----- 
#> je ne regrette rien 
#>  ------ 
#>     \   
#>      \  
#>       \
#>        \   _,
#>       -==<' `
#>           ) /
#>          / (_.
#>         |  ,-,`\
#>          \\   \ \
#>           `\,  \ \
#>            ||\  \`|,
#>  jgs      _|| `=`-'
#>          ~~`~`

See also bat2

Endless horse

endless_horse()
## -----
## Hello world!
## ------
##    \
##     \
##      \
##       ,
##    _,,)\.~,,._
##     (()`  ``)\))),,_
##      |     \ ''((\)))),,_          ____
##      |6`   |   ''((\())) "-.____.-"    `-.-,
##      |    .'\    ''))))'                  \)))
##      |   |   `.     ''                     ((((
##      \, _)     \/                          |))))
##       `'        |                          (((((
##                 \                  |       ))))))
##                  `|    |           ,\     /((((((
##                   |   / `-.______.<  \   |  )))))
##                   |   |  /         `. \  \  ((((
##                   |  / \ |           `.\  | (((
##                   \  | | |             )| |  ))
##                    | | | |             || |  '   [endless.horse]
##                    | | | |             || |
##
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |

Using pipes

library("magrittr")
"I HAD FUN ONCE, IT WAS AWFUL" %>% say('grumpycat')
#> 
#>  -------------- 
#> I HAD FUN ONCE, IT WAS AWFUL 
#>  --------------
#>     \
#>       \
#>         \
#>       ハ _ ハ
#>       ಠ X ಠ
#> 

I just want the animals!

Okay, hold your endless horses. Just use the exported vector animals, and you can select the animal you want by name.

animals['clippy']
#>                                                                                                                    clippy 
#> "\n\n ----- \n%s \n ------ \n    \\   \n     \\   __\n   / \\\n   | |\n   @ @\n  || ||\n  || ||\n  |\\_/|\n  \\___/ GB\n"

Meta

  • License: MIT
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

More Repositories

1

habanero

client for Crossref search API
Python
190
star
2

usdaplantsapi

DEFUNCT - REST API for the USDA Plants Database
TSQL
105
star
3

rphylopic

Get silhouettes of organisms from Phylopic.
R
77
star
4

rforcats

HTML
45
star
5

elastic_data

Elasticsearch datasets ready for bulk loading
37
star
6

request

http requests DSL for R
R
36
star
7

cchecksapi

CRAN checks API (DEFUNCT)
Ruby
33
star
8

pytaxize

python port of taxize (taxonomy toolbelt) for R
Python
31
star
9

serrano

Low level Ruby client for Crossref
Ruby
30
star
10

ftp

ftp for R
R
28
star
11

pdfimager

Extract images from pdfs using poppler <https://poppler.freedesktop.org/>
R
27
star
12

musemeta

R Client for scraping museum metadata
R
24
star
13

geoops

geoops does spatial operations on GeoJSON
C++
23
star
14

cites

Citation searching and retrieval
Ruby
17
star
15

mutant

mutation testing for R
R
16
star
16

fauxpas

fauxpas does http errors
R
15
star
17

apipkgen

Generate an R package from API specs
R
13
star
18

gggraph

Make graph/network plots with the ggplot2 package for R
R
11
star
19

webmiddens

cache http requests
R
10
star
20

httpcode

http status code investigation
R
9
star
21

recology

Code for the Recology blog
HTML
9
star
22

textmine

rOpenSci textmining manuscript
TeX
9
star
23

pytaxa

taxonomic classes for Python
Python
9
star
24

spenv

Combine environmental and spatial data
R
8
star
25

openadds

Openaddresses R client
R
8
star
26

pyminer

Text-mining toolset for Crossref data
Python
8
star
27

httping

Ping urls to time requests
R
8
star
28

beer_recipes

my beer recipes
HTML
8
star
29

spplit

connect species occurrence data to literature
R
7
star
30

parseids

Parse identifiers (e.g., DOIs)
C++
7
star
31

talks

my posters and talks
HTML
7
star
32

extcite

pull dois out of pdfs > content negotation > bib file
Ruby
7
star
33

discgolf

Discourse API R client
R
6
star
34

pubpatternsapi

PubPatterns REST API (DEFUNCT)
Ruby
6
star
35

pubpatterns

Lookup for full text urls
Ruby
6
star
36

rfna

Web page scraping for eFloras, including the Flora of North America
R
6
star
37

ridb

client for Index Database of remote sensing indices
HTML
6
star
38

splister

match species list against reference list
R
5
star
39

scott

My website
JavaScript
5
star
40

tpl-sqlite

ThePlantList as SQLite
R
4
star
41

auditopendata

audit open data in articles
4
star
42

rtaxamatch

taxamatch implementation in R
R
4
star
43

spplist

R
4
star
44

apisforcats

UNMAINTAINED
CSS
4
star
45

gbifms

manuscript covering rgbif, pygbif, and gbifrb
TeX
4
star
46

gbifrb

GBIF Ruby client; docs: http://www.rubydoc.info/gems/gbifrb/0.1.0
Ruby
4
star
47

textminer

text mine via Crossref's TDM
Ruby
4
star
48

ftdoi

Retrieve full-text urls on a per publisher basis
R
4
star
49

gbif-backbone-sql

GBIF Darwin Core taxonomic backbone to SQLite
Ruby
4
star
50

rforcatshex

Hex sticker for rforcats.net
4
star
51

bienapi

BIEN REST API
Ruby
4
star
52

resteasy

R
4
star
53

rwikispeedia

R interface to Wikispeedia
R
3
star
54

howmanyparams

3
star
55

catfact

demo pkg using vcr for httr testing
R
3
star
56

tecks

R
3
star
57

jqr

jq inspired json parsing
R
3
star
58

wdclients

Web Data R Clients
CSS
3
star
59

biodivcode

HTML
3
star
60

esamd

Materials for an #ESA2013 workshop on Markdown/git
CSS
3
star
61

mstext

Manuscript on rOpenSci scholarly text packages
TeX
2
star
62

IntWebData

Interface with the Interaction Web Database
2
star
63

shinyio

JavaScript
2
star
64

sxslt

R
2
star
65

nsidc

R
2
star
66

sacbox

Library of R functions from me and others
R
2
star
67

taxize

CSS
2
star
68

veyor

Appveyor API client for Ruby
Ruby
2
star
69

beer_recipes2

2
star
70

rgeojson

Files to convert to geojson in R
2
star
71

soylocs

restaurants that use soybean oil (mostly in portland), blarg!!!!
HTML
2
star
72

nameparser

R port of Ruby's biodiversity scientific name parser
Ruby
2
star
73

scientist

Experiment with changes R code, scripts or packages
R
2
star
74

turtles

2
star
75

pdftoolspdfs

1
star
76

rrocksdb

C++
1
star
77

egnar

European Nucleotide Archive R client
R
1
star
78

usgs

R interface to USGS APIs
R
1
star
79

rubfuns

playing with ruby functions in R
R
1
star
80

traitdb

https://traits.party
Ruby
1
star
81

SSOAP

R
1
star
82

apispecs

1
star
83

vcrhttr2

Testing Integeration of httr2 with vcr
R
1
star
84

isu-2016-11-16

HTML
1
star
85

tacksize

taxonomic library for Ruby
Ruby
1
star
86

func

Tools for function development
R
1
star
87

rubrb

helper cli methods for R package devs
Ruby
1
star
88

dendro

R
1
star
89

labnotebook

Open science notebook blog
1
star
90

gbids

Genbank ID checker/converter API - DOWN as of 2016-11-27
Ruby
1
star
91

pyalm_scott

Python
1
star
92

work

latex documents, etc.
OpenEdge ABL
1
star
93

foobar3

R
1
star
94

foobar2

1
star
95

taxspell

Spell Check Taxonomic Names
R
1
star
96

apistatus

adf
1
star
97

pyror

Research Organization Registry Python Client
Python
1
star
98

ncbi-common-tree

Shell
1
star
99

astr

R
1
star
100

canadiana

Canadiana R client
R
1
star