Blog Archives

A No BS Guide to the Basics of Parallelization in R

March 15, 2012
By

What is parallelization?Parallelization is using multiple processing cores to, hopefully, make your programs run faster than serial code, which is the use of just one processing core. Parallel code is not always faster than its serial counterpart (but if you're doing it right and you're careful about what you parallelize, it will be --- remember, that's your goal here). ...

Read more »

Sorting in R as Inefficiently as Possible

January 12, 2012
By
Sorting in R as Inefficiently as Possible

My last post of substance was all about improving your performance using R to answer programming questions that might be asked during a job interview.  So let's say you nailed the interview and got the job, but you desperately want to be fired for grand incompetence.  Never fear, your pal at librestats once again has your back. The sleep...

Read more »

Honing Your R Skills for Job Interviews

January 9, 2012
By
Honing Your R Skills for Job Interviews

My time as a grad student will soon draw to a close. With this comes the terrifying realisation that I'm going to start applying for jobs and, hopefully, interviewing soon, forever leaving my comfortable security blanket of academia. With that horrible thought in mind, I've been doing some poking around to see what various kinds of technical interviews are...

Read more »

R Fork Bomb

September 14, 2011
By
R Fork Bomb

So maybe I’m a strange guy, but I think fork bombs are really funny.  What’s a fork bomb?  The basic premise is that you spawn a process that spawns a process that spawns a process…, ad infinitum. The most beautiful example of a fork bomb, and really one of the most beautiful lines of code

Read more »

How Much of R is Written in R Part 2: Contributed Packages

August 29, 2011
By
How Much of R is Written in R Part 2:  Contributed Packages

So that mean old boss of mine is at it again.  This morning I came in beaming about how many people had read my post How Much of R is Written in R (thanks by the way!).  He then asks me about one little line in that post; the one about how if you looked

Read more »

How Much of R is Written in R?

August 26, 2011
By
How Much of R is Written in R?

My boss sent me an email (on my day off!) asking me just how much of R is written in the R language.  This is very simple if you use R and a Unix-like system.  It also gives me a good excuse to defend the title of this blog.  It’s librestats, not projecteulerstats, afterall. So

Read more »

Prime testing function in R

August 20, 2011
By
Prime testing function in R

I was hoping to begin tinkering a bit with the multicore package in R beyond some extremely trivial examples.  Thanks to a combination of R’s dumb quirkiness (for example, being worthless on loops), my poor planning, and general bad programming, my Saturday afternoon tinkering project is ultimately worthless in fulfilling that purpose. I was really

Read more »