5 ms·
R 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
by jzwinck 12y ago
R 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.