When an emacs user calls something aRcane…

I’m working through an online course on the R language https://www.coursera.org/course/rprog

I’m finding it quite arcane, retro, baroque. Just a few examples:

  • length(x)=5, assigning to a function to to set the length of an object? really ?
  • “1” based array index (FORTRAN, anyone?)
  • complete textual orientation (OK, not a problem for an emacs user)
  • Having to think about the size of objects being read in (echos of the days before virtual memory)

On the other hand, I was able to generate a heatmap in 3 lines of code (thanks to Bronwyn Woods for the pointer). I spent hours messing around with Python and JavaScript versions, but the R version Just Worked. Three lines. Amazing.

data <- data.frame(x=c(1,2,3), y=c(1,2,3), count=c(10,10,5))
levelplot(count ~ x*y, data=data)


Figure 1: Simple heatmap generated by R