Nerd up your R

I probably spend most of my working day in an R terminal, or at least I start R often enough. Now I saw in a blog I follow a way to entertain and instruct in equal measure everytime that little statistical box is opened: fortunes. This is a very simple package that collected and now shows citations related to R (and statistics in R). Some examples (and as of v1.5.2 there are 360 citations to choose from):

Release 1.0.0
(silence)
Wow! Thank you! […] If I am allowed to ask just one question today: How do
you fit 48 hours of coding in an ordinary day? Any hints will be appreciated
… 🙂
— Detlef Steuer (on 2000-02-29)
R-help (February 2000)

or

Perhaps one is the real forge and the other is a forgery? Or a forge-R-y? I’ll
get my coat…
— Barry Rowlingson (on the question whether http://www.RForge.net/ or
http://R-Forge.R-project.org/ is the official forge server)
R-help (April 2007)

Set-up

I have the following lines it in my ~.Rprofile (think of .bashrc but for R):

library("fortunes")
fortune()

This ensures each time I start R I am greeted by a nice little message to brighten my day:

my R start screen

How to install

I had some problems installing from cran, so went with install_url function of devtools which makes the process of installing from source easier when one does not need to download (and keep a copy of) a package source:

library("devtools")
install_url("http://cran.r-project.org/src/contrib/fortunes_1.5-2.tar.gz") #remember to use the link for the latest package version

And it is done!

Advertisements
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

One Response to Nerd up your R

  1. Pingback: The “p” problem in R plots, or when a dot is a font in inkscape | Moving to the Dark Side

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s