# Why was R designed as a 1-starting indexes language?

Spawning from here:

We usually don't care whether indices start at $$0$$ or $$1$$ (except in the sense we'd rather start with our favourite if it doesn't matter, and the old joke is that set theorists start at $$0$$ and non-Peano number theorists start at $$1$$). I say usually, because there are a few cases where we do:

• [...]
• [...]
• If there's programming involved, use the same indexing for your mathematical exposition as in the code itself, which varies by language. For example, Python starts at $$0$$, whereas R starts at $$1$$.

Why did they choose to start from $$1$$?

• See this SO question. – J.G. Nov 3 '19 at 12:46
• Until further clarification, I'll take that your reference is not to the question but to these one and two answers. – 108880 Nov 3 '19 at 12:53
• Compatibility with Fortran and Matlab? – Yuval Filmus Nov 3 '19 at 15:55
• Compatibility with Mathematica? In any case, counting starts at 1, there is no doubt about it ... measuring starts at 0 ... – EGME Nov 3 '19 at 20:22
• Also, if you index from 1 to n, n is also the number of elements in the set you indexed ... – EGME Nov 4 '19 at 15:51