5 ms·
The even bigger advantage of python is everything else: web scraping, interfacing with weird APIs, hitting the database, consuming and emitting obscure formats,
by jacobolus 10y ago
The even bigger advantage of python is everything else: web scraping, interfacing with weird APIs, hitting the database, consuming and emitting obscure formats, parsing text, calling operating system services, and a million other things. That and much much better abstractions for building larger systems out of reusable components and much better tooling for serious software engineering.
R or Matlab can be fine at exploratory data analysis, making charts, running miscellaneous bits of non-programmer-grad-student code found on the internet, etc., but as soon as you want to do anything other than data analysis, they quickly become annoying.
- minimaxir 10y agoIf you haven't looked at the R ecosystem in awhile, there is a package for each of those use cases. (scraping/API: rvest; database: dplyr; parsing text: stringr, etc). Yes, Hadley Wickham is primarily responsible for the popularity of R.
- jacobolus 10y agoWe’re talking about an order of magnitude difference in number of packages (82096 on PyPI vs. 8551 on CRAN) and their maturity, and such a naïve metric probably undersells the difference in variety of use cases. If you picked 100 random production python projects out of a hat, no more than a small handful of them would be remotely appropriate to build using R. And that's entirely fine. R is great at being a quick and dirty statistical analysis language for people doing data exploration.
- yoplait_ 10y agohow about quick and friendly?
- Houshalter 10y agoI suspect that the utility of more packages increases only logarithmically. Having 10x more packages doesn't mean it's 10 times more useful. If your obscure need isn't in the first 8,000 packages, it probably won't be in the next 80,000. That's just how power laws work. And any common task you can think of will probably be in the top 8,000.
- hadley 10y agoI totally buy that argument, but there's probably not a huge overlap in the set of "common tasks" for R and python.
- baldfat 10y agoPandas for Python is almost re-imaging of R (Base 0 instead of base 1 UGH) very closely and the "common task" match closely, but I still use R over Python.
- Houshalter 10y agoWell then all the more reason to use R, if those are the set of tasks you want to do.
- ekianjo 10y agoDplyr is not for databases at all. Its a piping operator that simplifies complex syntax a lot.
- Malarkey73 10y agoYes and no - the dplyr example code heavily used pipes but that's really a feature of Magrittr package. You can used dplyr without pipes. Plus dplyr essentially allows you to treat tables in a database as if they are data.frames.
- minimaxir 10y agoYes, you can use dplyr to connect and query data from a database. https://cran.r-project.org/web/packages/dplyr/vignettes/databases.html https://cran.r-project.org/web/packages/dplyr/vignettes/data...
- micro_cam 10y agoWickham has done a ton but but R had great popularity even before those projects, especially with projects like bioconductor.