Follow

Honest question: Is there anyone here fluent in both and who prefers R?

I know Python well and am still learning R. It feels kludgy, extremely context-sensitive, and more like an accreted bag of tricks than a designed programming language.

Maybe this is just my fear of change / computer scientist bias or issues with the particular book I'm reading. A part of me feels that students minoring (and someday majoring) in should know R because it's widely used, but another part worries that teaching them this inferior tool is doing them a disservice.

Is there an R champion in the house?

· · 4 · 1 · 2

@peterdrake so I can't say I prefer R, but I do like some aspects of it. So, a little bit of background: I did most of my undergraduate and masters research using R, particularly data mining biometric data for UX/UI experiments. I wasn't introduced to Python and Jupyter notebook until my last semester of my masters degree, and I've been using them ever since for my work and research.

R has what I call the anti-Pythonic philosophy: there are many packages/libraries that do the same thing. It was design for statistics first and foremost, hence the index starting at 1 and the multitude of statistical packages. This is particularly acute with statistical tests. One anecdote that I have was I found the same statistical test (believe it was Tukey's range test) in both Baylor's psychology statistical package and another stats package. Also, academia tends to make and publish their own statistical packages in R based on their research, though this has changed a lot, especially now that Python and Julia are more popular. However, despite R's anti-Pythonic philosophy, there is a more Pythonic push with Tidyverse ( en.m.wikipedia.org/wiki/Tidyve).

One of the positives that I like about R is that it (probably) has every type of statistical model you could want. For my regression class, I created an ordinal logistic regression model for my final project, which was only possible to do in R at the time (I believe I used polr). Python now has ordinal regression in statsmodels, but this was very recent and may not be as expansive as polr. I will say though that rpy2 has made package deficiency in Python less of an issue, but it still takes downloading and understanding R packages.

tldr; R's one shining positive is that it (probably) has every statistical model and test you can name, no matter how obscure it is.

@peterdrake I don't have the CS background that allows me to judge both languages in a theoretical/conceptual level and I'm definitely no R Champion.

I have used both languages for some time now and like both, with a clear tendency towards R. The reason is pretty subjective: in most cases I had, I could achieve the goal with fewer lines and less complicated structures in #Rstats than in #python.

1/2

@peterdrake
Another big + for #rstats imho is the community. I know that doesn't answer your question regarding R being taught in CS classes. But I learned both languages mostly by doing things. I always found better online sources or got more helpful feedback for specific questions for R, which then drew me closer to R every time.

In the hopes for a more sophisticated reply to you I'm tagging @juliasilge which I consider to be an "R Champion", as you put it.
2/2

@peterdrake @juliasilge
3/2 To be fair: I first had the same feeling about R: I didn't really see a "system" or understood "how things were designed to work". That's why I started learning python instead with a curriculum that was very good to follow.
After some time I decided to get back to R starting from scratch following a good curriculum as well and that actually helped me a lot. Now R feels more intuitive to me than python.

@peterdrake quite a late reply but I stumbled upon this short read by the author of 'The Art of R Programming':

github.com/matloff/R-vs.-Pytho

@peterdrake yes, I noticed that you mentioned the book whenever you found design issues with the R language. So I figured, you might find his comparison interesting in regard to R Vs Python data analysis

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.