Apr
26
2013
wrathematics
I've talked about the toy programming problem fizzbuzz on this blog a few times. In R, you might do something like this:
Or to be a bit more R-ish, you might do something like:
But there's a problem. That's all too readable! When I look at it, I know exactly what it's doing.
Enter Fortran.
I spend most of my life programming in Fortran these days --- which I then hook
Read more >>
no comments | tags: Fortran, Programming
Dec
3
2012
wrathematics
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 >>
2 comments | tags: Parallel R, pbdR, R | posted in R
Oct
16
2012
wrathematics
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 >>
16 comments | tags: Big Data, Parallel R, R | posted in R
Aug
14
2012
wrathematics
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 >>
6 comments | tags: Programming, R, R Quirks | posted in R
Jun
11
2012
wrathematics
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 >>
3 comments | tags: ggplot2, R, Visualization | posted in R
May
17
2012
wrathematics
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 >>
2 comments | tags: R, Shell Scripting, Visualization | posted in R
May
1
2012
wrathematics
I probably won't do any more of these, and I hadn't really planned on even doing this one, but I've been inspired. Apparently some Russians found my first post about doing Project Euler problems in LaTeX. According to google translate, my post was described as being part of "the horrors of our Internet" that our comrade stumbled on inadvertently through searching for something completely unrelated.
Read more >>
no comments | tags: fibonacci numbers, LaTeX, Project Euler | posted in LaTeX, Project Euler Solutions
Apr
23
2012
wrathematics
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 >>
no comments | tags: LaTeX, Project Euler, R | posted in LaTeX, Project Euler Solutions, R