3 ms·
As someone who teaches introductory-level programming in the data science/visualization domain, I think R is undoubtedly easier for getting non-programmers from
by danso 10y ago
As someone who teaches introductory-level programming in the data science/visualization domain, I think R is undoubtedly easier for getting non-programmers from CSV/Excel data to great visualizations via ggplot2. In fact, I keep R up-to-date on my own machine for when I need to do visualizations that I can't easily hack in Matplotlib+seaborn.
But I stick to teaching Python because my priority is that students become general-purpose programmer/hackers, and data science is a very small part of what they might use programming for in their careers. Python's pandas is definitely not as elegant as R's tidyverse, where the conventions and data structures are more baked into the language. But numpy+pandas is manageable enough for novices (and just fine for experienced programmers). It's a small tradeoff for all the things you can do in Python, whether it is build and deploy a web app with Flask/Django/etc, or integrate with AWS via boto, or more specific things like manipulate video with moviepy.
That said, obviously not every stats-focused person wants to or needs to become an all-purpose engineer. I think R has basically become the lingua franca for folks in poli sci and similar departments who want to do statistical analysis, and it seems to be a huge step up from doing things in SPSS or Excel.
- SubiculumCode 10y agoR does some things really well, and there are some advanced methids available ,but let's be clear, some functions in SPSS are quite advanced, for example SPSS mixed models are more advanced than lme4.
- bobbert_barker 10y agoWhat is more advanced about SPSS mixed models (not accusatory, just ignorant)? It looks like there are more covariance options, but is the estimation/implementation better/more robust or faster?
- SubiculumCode 10y agoWell I may be ignorant also, but as far as I can tell lme4/lmer doesnt have ANY options to specify the variance-covariance matrix while SPSS does. Also, when the number of within subject levels are few, I often find that using the classic repeated measures approach, but estimating using ML/REML (to handle random missing data) on a specified (or unstructured) covariance-variance matrix to be more powerful and/or more likely to converge while accounting for important dependences than mixed models using random effects...SPSS does this kind of analysis easily, but I havent found any equivalent packave in R.
- SubiculumCode 10y agoHM
- Noseshine 10y agoI agree. I'm glad I took time to take quite a few statistics courses using R though. I composed the sentence deliberately: Just a course "learning R" as we have for all other languages IMHO is pretty useless, unless it is for people already statistics-savvy. What I learned from the experience was a focus on the data, not the code. I can't explain it, but to me it seems that when I code(d) in regular programming languages my focus is different, much more on the code. When doing something in R my focus was much more on the data at hand. That's probably also because when I wrote/write normal software I do it generically, when working on an R problem I already had the concrete data set. Maybe that's different for people writing more advanced code in R like packages, then it may be closer to "normal programming", don't know. I assume most people using R are not doing it to program, but to get something from concrete data, and only a minority of R users do much programming. Clarification - I mean code like this: https://rpubs.com/Noseshine/74191 https://rpubs.com/Noseshine/74191 It's code, sure, but I just wanted to get something from the data, no thoughts of writing a general purpose program. R programming felt very "hackish" to me, but I also feel it's fine for such concrete-data-oriented purposes as in my example link. In that case it's like Excel but more editable, processable and reproducible since you've got linear source code, and not a path of clicks through lots of complicated dialogues.
- larrydag 10y agoI'm the Dallas R Users Group organizer and I could not agree more. I've had similar experience. Here is my opinion of the Python vs R "debate" in a nutshell. Programmers prefer Python because data science is just another hack for them to accomplish as they make their applications. Statisticians/Data Scientists pefer R because it is a standalone mathematical suite. I believe what drives a person to use R or Python is what kind of tool they want to use in their toolbox to accomplish their respective task at hand.
- bsg75 10y agoThis is an excellent summary, and covers the cases for those of us who use both and when they choose one vs the other.