Hacker News new | ask | show | jobs
by teekert 762 days ago
I am seeing a downfall in industry, where R has a researchy image, when stuff gets serious, R scripts are rewritten into Python packages.

But in the academic world (I'm in bioinformatics)... There seems to be nothing but R, in my experience. I don't really like that, because we have Snakemake and a lot of ML stuff, all Python, and the R people have a barrier to get started. I myself associate R with "just scripts and notebooks". Never do the R people seem to make anything into a well maintainable module. They make the notebook, use the build-in R functions and then their work is done. It seems to be different in the Python world where I see people writing modules that are "re-useable assets", and then those are used in notebooks for data science. This is probably my industry bias and perhaps Python-using academics also never make packages.

I guess also that there is no such a thing as poetry in R? I'm not entirely sure...

5 comments

> I am seeing a downfall in industry

Exactly, it is an industry-driven change IMO. In fact, R has gained a lot of popularity in academia, especially in the Social Sciences --though perhaps Python has gained even more.

But in industry, R's falling hard. I also think that the growing popularity of cloud analytics platform solutions such as Azure Synapse (now Fabric) is a significant factor. Though SparkR is a decent R-native API to Spark, Python has so much support in those cloud analytics ecosystems, it's hard to keep doing things in R.

> and perhaps Python-using academics also never make packages.

Your guess is (largely) correct. For most users, the workflow is exactly as you described:

> They make the notebook, use the build-in R functions and then their work is done.

You know you can use snakemake to run r scripts too.
The poetry equivalent would be renv.

R is a highly functional language modeled after Scheme. In many ways it's more powerful than python, especially due to its metaprogramming capabilities. It's possible to write maintainable, readable, high-quality code in R (just look at the Tidyverse[0] libraries). The issue is that the user base is mostly scientists and statisticians, and they just don't.

The bioinformatics space seems especially dire with dumpster fires like Bioconductor.

[0] https://www.tidyverse.org/

This is so wrong and all FUD. At my company R users write modular packages and deploy them to internal CRANs while python users write scripts and email them because it is way easier to write modular code in R because R favors easy on ramps for new users while embracing good ideas like immutable semantics and functional programming. Further, R has targets which is way more general than snakemake. Even from a reproducibility perspective, R wins hands down. Getting an R package into Guix is trivial compared to a python package. This means that in 10 years, more R code will still run than python. It really saddens me to see the level of dishonest crap which goes unchallenged to make an inferior prototyping language kill the only lispy language with good numerical libraries.
To be fair, I was sharing my perspective, thanks for sharing yours. I guess we both offered some anecdata here.