Hacker News new | ask | show | jobs
by condwanaland 390 days ago
I strongly think that R has outgrown just having statistics as its killer feature. The killer feature of R is data analysis

I have yet to see any software that rivals dplyr, data.table, and ggplot2 in the balance of power and ease of use. It also has all the auxiliary packages you need to fetch your data (DBI, httr, rvest), model it if necessary (parsnip, caret) and visualise it (ggplot2, plotly, shiny)

I know python is more popular here but I would choose R in a heartbeat 19 times out of 20

1 comments

Is Python especially popular because of its easier learning curve?
Possibly. I think R is actually easier to learn for people who have never studied or done programming before.

1. It's easier to get up and running as RStudio is much more 'batteries included' than other popular IDEs, it's harder to get into the case of multiple different python versions, and you install packages through the R interpreter rather than via pip at the command line

2. I would say R data analysis packages are easier to learn than the python equivalents. Because the dataframe is a native structure in R there has been a lot more packages that have tried alternative syntax approaches to try and find the 'optimal' one. Python has really only had pandas, polars, and pyspark (all of which have implemented their own data structures and therefore have focused more on performance than syntax)

3. This doesn't hold if you're studying a language to be a general purpose programmer. Then python is much better. Anything to avoid the hell of the R standard lib. But if you need to do a bit of coding to analyse data and you've never done any before, my vote would be for R.

However, these are thoughts from my own personal anecdotes rather than any pedagogical theory

I'd also say because of its price (especially vs MATLAB and Mathematica) and the huge ecosystem of libraries for basically every scientific domain.
Those libs likely only exist because of how easy python is to learn. So, snake tail situation maybe.
I haven’t used matlab for 10+ years, but back then Matlab used to provide engineering packages for vibrations and non-linear models approximations, I’d imagine the effort of going Python/ open source code to just to redefine your model for both purposes and then validate and verify the results would be a 10-50 fold cost of paying for a license
Well, a lot of those libraries are C libraries that have Python bindings.