Title with apologies to the Wu-Tang Clan. In this post, we're going to be discussing: Rcpp R's C interface The importance of CPU caches Performance benchmarking If none of these things is of interest you and you clicked anyway, please enjoy this picture of a cat: Background Cache is like your computer's ram, only very small and 50-100 times faster to pull information from. Information in Read more >>
R is full of things that make "real programmers" (I dislike this term) turn their noses up in disgust. One of my favorites is the dump() function. It is...odd. I think the best way to introduce it to people is without context, because it's just so bizarre: That's right; it's actually dumping out R code that would allow you to generate the object. I have actually even found some intersting uses Read more >>
Most search engines have a "did you mean?" feature, where suggestions are given in the presence of likely typos. And while search engines use sophisticated NLP methods on their vast amounts of user-generated data to create accurate suggestions, you can get by with some ancient spellchecker techniques. So a little while ago, I did just that with the Rdym package for R. Example Usage of the package Read more >>
The Rfiglet Package For those who don't know what figlet is, it's a command line utility for creating ascii logos.  Rfiglet, therefore, is a set of R bindings for figlet. Works about like you would expect: There are over 150 fonts available, and you can see an example of each one in this Rfiglet package vignette. We can even use our ascii art with another ascii package that emulates Read more >>
Almost 3 years ago, I wrote about how to forkbomb with R. A quick recap is that a forkbomb is a low-tier, malicious misuse of a system; sort of a "baby's first denial of service". The idea is that you write a program that will start an entirely new copy of itself each time it is executed. Executing it will quickly gobble up all available resources, generally locking up the system. Naturally this Read more >>
Warning: this post contains profanity...arguably excessive amounts of it.  If you are a humorless no-fun, you are recommended to proceed no further. Seriously though, the title is quite descriptive of the content of this post.  If you are offended by the use of such language, or if your boss is likely to come peering over your shoulder soon, I don't recommend you proceed.   "F-Bombs" Read more >>
R has some extremely useful utilities for profiling, such as system.time(), Rprof(), the often overlooked tracemem(), and the rbenchmark package. But if you want more than just simple timings of code execution, you will mostly have to look elsewhere. One of the best sources for profiling data is hardware performance counters, available in most modern hardware. This data can be invaluable to understanding Read more >>