I disagree, the language is extremely powerful for interactive data exploration. A terse one-liner is all it takes to compute something like "what's the correlation between number of children and home size for people over 45 who live in counties with income variance at the 90th percentile weighted by population".
Not that pandas/scipy/numpy don't make an admirable job. You can do something like this, but it's nowhere near as ergonomic as it is R. At the end of the day, R is fundamentally a language for data exploration, whereas with python those facilities are bolted on top of a general purpose environment.
I totally agree that it is a very efficient and powerful tool for ad-hoc data analysis. It's just not what I would view as a responsible choice for production / publication code.
This is the best description of R that I've ever come across, and I say that as someone who learned R as their first programming language.
Big mistake, btw. It took me years to unlearn all of the terrible habits I picked up from the R world. Do yourself a favor and start with python, if only to learn proper programming practices and techniques before diving into R.
While I agree that Python is better than R for programming etiquette, I would argue that proper programming practices and techniques are better learned in languages with static typing and proper variable scoping.
Do yourself another favor and also look into C#, Swift or even Java.
If R is a reasonable tool for a given problem, C# or Swift or Java almost certainly will not be. The realistic alternatives to R are other numerical analysis packages, Julia, and Python. “The” answer for any given person or project is likely to be a function of your colleagues and peer group, your problem domain, your library needs.
One of course is allowed to learn more than one thing. Maybe play with a bondage and discipline language to expose yourself to the concepts the parent comment is advocating for.
They're not saying use Swift/C# for those problems, they're saying learn good programming practices from those languages and tools and then go do things in R/Python with that expertise under your belt.
A lot of people don’t have the luxury of doing both those things. They’re confronted with a problem and need to solve it, and solving it requires choosing and learning how to use a tool. If you have plenty of free time, choosing C#, Swift, and Java seem like odd choices for a pedagogic programming language. For learning about type safety, spending a couple weeks playing with SML or Haskell would be a good idea, though they’re both functional.
As a student I constantly complained that we were being taught these useless languages. As a grownup I realize that while some of the Comp Sci faculty may’ve been out of touch, their goal was not teaching us commercially viable skills. They were endeavoring to teach us how to think. Once you know how to think you can express those thoughts in nearly any language, no matter how hostile to those thoughts it may be.
But maybe you just want to get things done, and if that’s so, the answer for data problems is basically one or more of R, Python, Julia, etc.
As I programming language I don't love R. I didn't get it till I took a biostatistics class. (We could use Stata/Excel or R for the class). It really shines analyzing data. Its loved by statisticians and some programmable attributes too.
Biologists like it for single cell analysis. They use Seurat and save the data as an object and load it up/ pass around around for analysis. Its actually kinda neat.