Tag: r

The case of the missing zero index

R is 1-indexed. Some people probably get unreasonable riled up about this.

1
2
arr <- c("first entry", "second entry", "third entry")
arr[1] # => [1] "first entry"

But what happens if you try to use 0 as an index?

Infix operators I have known and loved

For the last month or so, I’ve been learning the R programming language. It’s been super-interesting, and quite the change from my usual stomping grounds of high-level OO languages like ruby or python.

I’m now past the point of complete beginner, and getting my teeth into some of the more advanced stuff.1 One thing I’ve already had a bunch of fun with, however, is R’s infix operator syntax.