Never intended to write a program, that is why I used R for this exercise. Treating your R-fobia will make your life less miserable lol
It is not R-phobia. I have worked in R extensively to know that it doesn't even qualify for a modern language, IMHO, for e.g. something like Python, or even Java. Or even C/C++. It is just rubbish. There is no reason to use it. Python is all one needs in place of it. And, at other places, Java and/or Scala. And, C/C++ where none of the afore-mentioned can be used.
I'm quite serious. Despite what you might hear from supposed 'data scientists' about R, it is just a flagrant distortion of the notion of a 'programming language'. Enough said.