Publications by wrathematics
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 r...
2506 sym R (2344 sym/3 pcs) 20 img
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 I grabbed the R-2.13.1 source package from the cran and wrote up...
3248 sym R (2590 sym/3 pcs) 20 img
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 at the contributed packages, you’d overwhelmingly see them written in R, and that this is ...
4217 sym R (4524 sym/3 pcs) 24 img
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 ever, was created by Denis Rolo: :(){ :|:& };: A...
2146 sym R (54 sym/2 pcs) 16 img
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 ...
6999 sym R (2561 sym/12 pcs) 2 img
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 sort...
5288 sym R (993 sym/7 pcs) 6 img
A No BS Guide to the Basics of Parallelization in R
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 — remem...
8769 sym R (2420 sym/5 pcs)
Statistical Software Popularity on Google Scholar
Background (probably boring) Several months ago, my boss and I were discussing how he got the data for his software popularity article; the rest of the background discussion pertains to those plots, so I would recommend going over to take a look before continuing on (or just skip to the next section if you’re impatient). Specifically, we were...
6854 sym R (4725 sym/2 pcs) 2 img
Project Euler…in LaTeX?
I’ve been joking for a while now that I was going to start solving project euler problems in LaTeX. Then today I finally did one. So let’s talk about solving Project Euler problem number 1 (the easy one) using only LaTeX. The problem asks you to sum up all the positive integers below 1000 which are divisible by 3 or 5 (or both). Doing t...
2558 sym R (1141 sym/5 pcs)
Visualizing the CRAN: Graphing Package Dependencies
I had been meaning to start toying with the igraph package for a while. So a few weeks ago (lay off, I’m busy), I decided to grab a bunch of CRAN data about package dependencies. The easiest way that I could think to get this information was to just grab the html files for all the package descriptions and chop through them. Quick note before I ...
5131 sym R (3473 sym/5 pcs) 14 img