matloff / TidyverseSkeptic

An opinionated view of the Tidyverse "dialect" of the R language.
512 stars 46 forks source link

My two cents on the discussion + the problem with reshape #18

Open smartinsightsfromdata opened 4 years ago

smartinsightsfromdata commented 4 years ago

I enjoyed Prof. Matloff post, as usual fair and thought provoking. (apologies in advance if I take a bit of time to get to the point and for my opinionated opinions: I had never thought to voice my point of view and I thank Prof. Matloff for the opportunity to do so)

Disclaimer: I am as much as a tidyverse skeptic as prof Matloff (possibly even a tidyverse basher!).

A personal journey I learned R in 2013, when (thanks to the gods) the tidyverse had not emerged. I found R a fun programming language, full of nice little time-saving idiosyncrasies (the apply family, do.call function etc.). Rapidly the need to speed let me discover and learn (a bit painfully, I confess) data.tables. But once the efforts paid off, like for anything you conquer with your own efforts, I felt a great sense of satisfaction and power. I then started to work progressively in python & advanced nlp (now almost exclusively). In parallel this all-devouring monster of the tidyverse started to emerge and now risks to take over this much belowed language.

The nature of the tidyverse Programming languages have always oscillated between two extremes:

I think is personal choice what to prefer. I do prefer programming in APL-like languages and R.

The tidyverse is perversly making R looking more like Cobol (perverse as in changing the nature of).

This would not be so bad if the tidyverse would keep itself separate. I found this not been the case and certainly one of the crunching points is reshape.

As we all know, reshape (or is subsequent re-incarnation reshape2) helps in changing a table in wide to long format and viceversa. Doing so it computes also clever aggregations (sum of course plus others).

Two functions in one statement? Heresy against the fundamental principles of the tidyverse!

Bottom line: reshape2 has not been updated since 2017 and is described as "archived" (certianly not very good for any corporate programming policy).

The net effect is that forces people to choose tidyverse, as it is harder to change shapes and aggretate results without reshape2.

It is no surprise that the data.table team has just come up with dedicated functions for reshaping long and wide (they existed before as extension of reshape, but certainly they could see thet they were operating on shaky ground).

Note I like magrittr and the pipe operator, invented prior to the tidyverse & separately, but I do not use them excessively.

I mentioned above as I'm using python more and more. Python is less fun than R, certainly. But in my personal opinion is better than a tidyverse, Cobol-like no-fun world.

It is just sad, really.

Tidyverse is as fun as Cobol

drag05 commented 3 years ago

@smartinsightsfromdata : The lack of updates of reshape2 hasn't forced me (at least) to choose tidyverse: I became an exclusive data.table user and dropped all things "tidy". I think data.table solves many tidy messes in one big swoop. I disliked the pipe operator from the beginning as I found it destroy the mathematical construct of implicit function.

If tidyverse was the last remaining option in R I would opt for C/C++ .

matloff commented 1 year ago

:-)