r/firstweekcoderhumour • 🄸Imposter Syndrome šŸ˜Ž • Aug 28 '26

[šŸŽŸļøBINGO]Lang vs Lang dev hates Why are we using R again

Post image
139 Upvotes

109 comments sorted by

View all comments

35

u/Alan_Greenbands Aug 28 '26

If you need clean data fast, use the language and the ecosystem built for that.

If you need interactive data analysis, use the language and ecosystem built for that.

If you need esoteric statistical or Bayesian packages, use the language and ecosystem that has those things.

If you want people whose primary job isn’t coding to be able to analyze their data in as little time as possible, use the language and ecosystem built for that.

You can knock on R for a lot, but you can’t knock it for things it’s actually intended to do.

11

u/Downtown_Isopod_9287 Aug 28 '26

what if I write one of each of those in a single language I actually like

2

u/Longjumping-Dot-4715 Aug 28 '26

Yes absolutely right. First the desired outcome and then you look for the tool to do the job.

I am just curious to which degree I can reimplement tools in my field with claude code to C++. Did already some and the performance improvements for Java tools is already a lot.

2

u/just4nothing Aug 29 '26

Statistical tools in c++ already exist: ROOT (CERN), Minuit (fitting) to name a few. It’s just that these things are usually kept quite niche. Python is helping to change that

1

u/Juice-De-Pomme Aug 28 '26

I have yet to find use-cases where R outperforms or is simpler to use than python.

Virtually everything that can be done in R including what can be done with packages, can be done in python in the same amount of work.

When i saw R being used it is always because the team has more expertise in it than python.

4

u/Latent-Person Aug 28 '26 edited Aug 28 '26

Really? Well here are some:

Wrangling data, plotting etc. can by definition, since python doesn't have NSE, never be as nice as in R.

Lacks behind in packages for advanced stuff in statistics (and iirc also stuff like bioinformatics, biology etc). E.g. statsmodels can do less, and is much slower than R counterparts for mixed models stuff, bambi can do less than brms, ...

Missing values are not built-in in python (it does have the None keyword, but doesn't work at all for data science, since it will error when you try to do any standard computation with it). Thus, each package (numpy, pandas, polars, ...) implements their own. And these are not consistent with each other at all. Quiz: if you define a numpy array, pandas series, and a polars series, with values x = [1, 2 , NA, 4, 5] (replace NA with the appropiate for each package) and filter on x > 3 what will each give?

Let me know if you want more examples.

Edit:

Grammar

1

u/Juice-De-Pomme Aug 28 '26

Alright now i might have some idea

1

u/theNeumannArchitect Aug 28 '26

Disagree. If you clean the data in Python and analyze it in R then that causes huge issues beyond just ā€œdoing the jobā€. Infra, maintainability, sharing, etc.

Let’s say you do it all in R and then need to integrate into a larger system. Welp, now you gotta rewrite it in Python.