R

All posts tagged R

Naming Rules in R How are objects allowed to be named in R? As it turns out, this is a very different question from how should objects be named. This isn't about style conventions, camelCase, dots.verus_underscores, or anything like that; this is about what is strictly possible. I do a lot of outreach to HPC people who are starting to get an interest in R, often because their users are starting Read more >>
Sometimes intentionally writing bad code can be a lot of fun. Now here, when I say "bad", I mean something that's functional but completely incoherent to anything but the machine. There are even competitions for this kind of thing, but I only consider myself a dabbler in this dark art. Thankfully, it's often pretty easy to make obtuse code in R. Given that I have a weird admiration for bad code Read more >>
Over the weekend, we updated all of the pbdR packages currently available on the CRAN.  The updates include tons of internal housecleaning as well as many new features. Notably, pbdBASE_0.1-1 and pbdDMAT_0.1-1 were released, which contain lm.fit() methods.  This function in particular has been available at my github for over a month, but didn't make its way to the CRAN until recently because of Read more >>
I am very happy to introduce a new set of packages that has just hit the CRAN. We are calling it the Programming with Big Data in R Project, or pbdR for short (or as I like to jokingly refer to it, 'pretty bad for dyslexics'). You can find out more about the pbdR project at http://r-pbd.org/ The packages are a natural programming framework that are, from the user's point of view, a very simple Read more >>
R is my favorite programming language.  It's just so useful for getting work done.  Sometimes people will complain that R is a difficult language.  To me, this begs the questions:  difficult for what?  And for whom?  I personally think R is just about the easiest thing in the world for prototyping.  Meaning if you want to quickly crank out some result, R is king.  Now when you get into optimization, Read more >>
Background As of ggplot2 0.9.0 released in March 2012, there is a new generic function autoplot.  This uses R's S3 methods (which is essentially oop for babies) to let you have some simple overloading of functions.  I'm not going to get deep into oop, because honestly we don't need to. The idea is very simple.  If I say "I'm sending a letter to my sister", you wouldn't be all, "Oh, which letter?  Read more >>
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 forget: I'm not looking at any base packages. Only Read more >>
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 this in R is easy.  You could efficiently do which Read more >>