4 ms·
I would say you could replace R with Python or Julia and do just fine. Anything must be better than SPSS. That said, R had come a long way in recent years and
by teruakohatu 5y ago
I would say you could replace R with Python or Julia and do just fine. Anything must be better than SPSS.
That said, R had come a long way in recent years and is enjoyable to use. It is very complete as far as statistics go.
- nabla9 5y agoI think that R libraries have edge over Python and Julia in quality and quantity. If you like to write lots of code, Python might be better. But if you use it in clinical research, R has probably better packages for whatever you need.
- tomrod 5y agoR packages are the wild west as far as code quality goes. In one corner you have Hadley Wickam producing phenomenal efforts like tidyverse and ggplot. In the other corner you have a herd of feral cats. Python gets scrutiny but most packages are on github and feedback can be received. Although, you should read the source code regardless. EDIT: And I re-emphasize -- never trust the source code, even if the company you work with indemnifies. One commercial product we used in particular had an insidious bug in one of the new time series packages that got corrected with in later versions, but we never would have found it if model testing requirements didn't also require implementing in R or Python. Since the package didn't exist for Python, and we wrote it ourselves, we found the performance issues.
- nabla9 5y agoThere are different qualities. Code quality and quality of the functionality. In R you more packages that do what you expect (mathematically) but the implementation is inelegant and slow. Written by someone who knows exactly what they need and what the package should do, but has difficulty of writing it down. In python you many well implemented neat packages where the code is well implemented and performs well, but is not exactly doing what user need or skips important features because they are conceptually difficult.
- deleted 5y ago[deleted]
- tomrod 5y ago> In R you more packages that do what you expect (mathematically) I disagree with this point explicitly. Many packages are not only poorly written programmatically and systemically, they also produce bad results in common cases and fail silently. This has been discussed well before on our very own YCombinator. https://news.ycombinator.com/item?id=17308554 https://news.ycombinator.com/item?id=17308554 > is not exactly doing what user need or skips important features because they are conceptually difficult. This is why classes are cool. You can extend them, modify them, and so on. Perhaps we should teach this more to fellow data scientists. https://docs.python.org/3/tutorial/classes.html https://docs.python.org/3/tutorial/classes.html
- disgruntledphd2 5y ago> This is why classes are cool You may be unaware, but there are vast similarities between the object system of R and Python, mostly due to their common inheritance from the Art of the Metaobject protocol. They look very different (generic functions vs classes), but they are equally extensible. The trouble with R's systems is that there's three of them, and people use whichever works without really understanding any of them, but all the tools are there.
- tomrod 5y agoAware, yes. The point I made before was pointing out that you can implement what you want in Python relatively easy. That R has a wild west set of systems is exactly my point.
- disgruntledphd2 5y agoI don't really get what you mean. You said, in the context of ensuring conceptually difficult parts of a model/method were implemented: > This is why classes are cool. You can extend them, modify them, and so on. Perhaps we should teach this more to fellow data scientists. I pointed out that both R and Python have similar object systems. > ou can implement what you want in Python relatively easy. I don't get why this is necessarily true, but I might be missing something. Can you clarify?
- akg_67 5y agoOne’s who come from programming background prefer Python. The one’s who come from scientific or statistics background prefer R. IME, for production Python rules and for data exploration, graphics, stats and adhoc analysis R rules.
- ekianjo 5y agoR has much better syntax with tidyverse for data wrangling and even up to models with tidymodels and all. Python in comparison is hard to read.
- z77dj3kl 5y agoWhat... Have you seen the piping syntax in tidyverse? It's incomprehensible unless you put in a lot of effort to understand all that's going on.
- teruakohatu 5y agoWhat is incomprehensible about it?
- tomrod 5y agoGrandparent commenter mentioned the piping syntax, specifically.
- disgruntledphd2 5y agoI dunno, I got pretty sick of writing head(filter(df, value>10)) and it's (a little) easier to indent as df %>% filter(value>10) %>% head(). It's problematic because people abuse it for everything (300 line pipes are common, sadly) but it's a really useful tool in moderation.
- lordgroff 5y agoThis is such an odd take. I program almost exclusively Python these days and I miss the elegance of piped functions daily.
- Maxion 5y agoIt depends on what you're doing, there's a lot of genomics related packages for R that do not exist in python.
- jhbadger 5y agoExactly. Bioconductor is essential to genomics.