Small timer for R

My coworker told me that pie charts never make sense. To prove him wrong I proudly present a fantastic R function that reminds you to spend not too much time on coffee drinking, rss feed reading or whatever else is stealing your time:


GeSHi Error: GeSHi could not find the language r (using path /www/htdocs/w006f92c/blog/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

So timer(someNumber) will result in the following graphical output and the red part will take approximate someNumber seconds to fill the whole pie:

Animated Timer

You are still reading? Hmmm… then here also is the code that produced the animated gif above:


GeSHi Error: GeSHi could not find the language r (using path /www/htdocs/w006f92c/blog/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

Execute the code above in R. Then open a shell and produce an animated gif out of the one hundred png files with ImageMagick:

convert -delay 20 -loop 0 timer*.png animatedtimer.gif

P.S.: My wife tells me that she likes pie charts because of the pie… :-)

Tags: , , ,

2 Antworten zu “Small timer for R”

  1. Lena sagt:
    Opera 9.61 Linux

    Pacman in red! Pacman in white! Pacman in red! Pacman in white! …

  2. Kornel sagt:
    Mozilla Firefox 3.0.4 Ubuntu Linux

    I forgot to tell you that some people have serious troubles with pie charts…

Eine Antwort hinterlassen