5 ms·
I gave up on R long ago. On python, pandas, numpy, scipy, scikit-learn and statsmodels are often enough to replace basic R functionality. In the case of needing
by nkrumm 12y ago
I gave up on R long ago. On python, pandas, numpy, scipy, scikit-learn and statsmodels are often enough to replace basic R functionality. In the case of needing an actual R package, I've found it's almost always worth the time to build a wrapper on rpy2, or use ipython notebook's rmagic extension.
On the note of building wrappers-- it's still a good idea to rpy2-wrap basic statistical tests and present in both ecosystems. The R functions are battle-tested and have been looked over by far more statisticians and mathematicians than their python counterparts (or so it seems).
- hadley 12y agoI gave up on Python long ago. Anything I want to do in Python, I can do just as easily in R. Rcpp provides a great environment for intermingling high performance c++ with expressive R code. R has all th r features you'd want for a modern development environment: good IDE, unit testing, documentation conventions, ... It's easy to turn analyses into interactive apps with shiny. There's a package for every model you can think of. You can connect to databases, you can talk to web apis and scrape web pages.
- IndianAstronaut 12y agoShiny is incredible. My company might be delivering a customer facing product using Shiny.
- joyofdata 12y agoI do second that - http://www.joyofdata.de/blog/hierarchical-clustering-with-r/ http://www.joyofdata.de/blog/hierarchical-clustering-with-r/ :)
- jzwinck 12y agoR makes it hard for teams to collaboratively develop code in libraries. No, R packages are not a solution, because each user has to "build" and "install" them every time another user checks in an update. R doesn't have a debugger on par with Python's pdb. It also doesn't show you tracebacks by default when errors occur, which is a huge problem for mere mortals when something goes wrong. If you're working alone, using well-tested libraries, none of the above will stop you. But if you work on a team, these are big problems (for which Python has solutions built in). Since you mentioned connecting to databases, let's talk about using MySQL in R. I downloaded a popular package to do that, and found that the function to query the database is called "fetch()". Just "fetch()", not "mysql.fetch()", not "database_fetch()", not "connection$fetch()", but "fetch()". That kind of sloppy naming is par for the course in R, and it's a problem when your project becomes larger than yourself.
- hadley 12y agoMost of those problems have existing solutions. 1. Do you know about browser()? That gives you an interactive debugger on par with most programming languages. Also see the GUI wrapper to the debugger in RStudio. 2. Share a library (a collection of installed packages). I'm not sure how you're doing this with python libraries, but there's probably a straightforward equivalent in R. 3. Once MySQL implements the new the DBI 0.3.0 interface, the function name will dbFetch(). But at heart the function is named that way because R uses generic function style OO, rather than message-passing OO - it's nothing to do with sloppiness. I'd recommend reading up a bit on the advantages and disadvantages of each style of OO.