Introducing Rfiglet: ASCII logos from the comfort of R

August 19, 2014
By

(This article was first published on librestats » R, and kindly contributed to R-bloggers)

The Rfiglet Package

For those who don’t know what figlet is, it’s a command line utility for creating ascii logos.  Rfiglet, therefore, is a set of R bindings for figlet.

Works about like you would expect:

library(Rfiglet)
figlet("ascii")

#                _ _
#  __ _ ___  ___(_|_)
# / _` / __|/ __| | |
#| (_| __  (__| | |
# __,_|___/___|_|_|
                     

There are over 150 fonts available, and you can see an example of each one in this Rfiglet package vignette.

We can even use our ascii art with another ascii package that emulates a command line utility, cowsay:

library(cowsay)
library(Rfiglet)

say(paste(figlet("longcat is long"), collapse="n"), "longcat")

# -----
#  _                             _     _       _
#| | ___  _ __   __ _  ___ __ _| |_  (_)___  | | ___  _ __   __ _
#| |/ _ | '_  / _` |/ __/ _` | __| | / __| | |/ _ | '_  / _` |
#| | (_) | | | | (_| | (_| (_| | |_  | __  | | (_) | | | | (_| |
#|_|___/|_| |_|__, |_____,_|__| |_|___/ |_|___/|_| |_|__, |
#               |___/                                       |___/
# ------
#    
#     
#    .ハ,,ハ
#    ( ゚ω゚)
#    |つ  つ
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    |    |
#    U " U

For those of you who are familiar with integrating compiled code into R, you may find my approach in this package somewhat amusing/horrifying.

 

Figlet as a Service

As we all know, software’s out and services are in.  That’s why I also created Figlet as a Service.  Ascii is finally ready for the enterprise.

To leave a comment for the author, please follow the link and comment on their blog: librestats » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)