# Articles by jean-robert.github.com

### Optimal Meeting Point on the Paris Metro

March 20, 2013 |

tl;dr: Play with the app here When you live in Paris, chances are you are (home or work) very close to a metro station, so when you want to meet with some friends, you usually end up picking another metro station as a meeting point. Yet, finding the optimal ... [Read more...]

### 1 + 1 = 3, the proof in R

December 1, 2012 |

Discussing with some friends the other day, one of them mentioned a supposedly famous quote from Einstein saying that 1 + 1 = 3. Despite my best efforts, Google couldn’t find that particular quote. Anyway, we were trying to understand how could have Einstein come up with that. Our answer was that the proposition “1 + 1 = 3” ... [Read more...]

### Prime Factorization Visualization with R and Shiny

November 20, 2012 |

Quite a lot of people have had fun recently with prime factorization. It all started on The Math Less Traveled, then various versions of the prime factorization diagrams appeared (here, here, this animated one, etc., they are actually more or less listed here). So I wanted to have fun too ... [Read more...]

### A thermometer in R using Arduino and Java

November 11, 2012 |

A couple of weeks ago, Markus Gesmann demonstrated the feasability of connecting R and Arduino using Processing and Rserve in a nice and simple example. This actually rekindled my interest in Arduino that I hadn’t had time to satisfy… Again I will show a very easy and simple example, ... [Read more...]

### Multiple progress bars

February 20, 2012 |

It is pretty easy to monitor the progress of a long loop in R using the original txtProgressBar function in the utils package. It works like this:
mypb <span><-</span> txtProgressBar<span>()</span>
m <span><-</span> sapply<span>(</span><span>1</span><span>:</span><span>1000</span><span>,</span> <span>function</span><span>(</span>x<span>)</span> <span>{</span>
setTxtProgressBar<span>(</span>mypb<span>,</span> x<span>/</span><span>1000</span><span>)</span>
mean<span>(</span>rnorm<span>(</span>x<span>))</span>
<span>})</span>
close<span>(</span>mypb<span>)</span>
You could even get a GUI-type output using tkProgressBar from the tcltk package, or winProgressBar. Or you could build your own. The ... [Read more...]

January 22, 2012 |

Last week, I came across two interesting posts by Romain François and Petr Simecek: Crawling Facebook with R, in which Romain explains how to connect to the Facebook Graph API Mining Facebook Data: Most “Liked” Status and Friendship Network, in which Petr use Romain’s function to visualize your ... [Read more...]

### Initial thanks

January 21, 2012 |

Starting this blog with initial thanks to Josh Suereth from whom I cloned the template of this blog, Tom Preston-Werner who made Jekyll (a static site generator for this blog), Scott Chamberlain who made me aware of it. [Read more...]