Earlier quoted context omitted.
Even if you ignore the tidyverse, the example code for "roll your own linear regressions by hand" uses the R6 object system, which is... not even one of the two popular object systems for R (which are S3 and S4). No beginner needs to learn how to write classes in R.
`no beginner needs to learn how to write classes in R`. a) using classes properly is great for all level R users; b) a major reason that classes are not widely used (for beginners) is that S3/S4 are not easy to follow. R6 provides a natural and clear way to understand and write classes (especially for beginners).
Another Book on Data Science – Learn R and Python in Parallel
91–96 of 96 posts
Re: Another Book on Data Science – Learn R and Python in Parallel
#92Earlier quoted context omitted.
I agree for the most part, but R does have a few things beyond the tidyverse: built-in dataframe support, lots of domain-specific packages, more consistent interfaces for basic statistics and machine learning models, etc. Python is definitely better for matrices (because of NumPy) and anything involving custom gradient descent methods (because of TensorFlow). I think 90% of data science content is for beginners becau…
> Python is definitely better for matrices (because of NumPy) How so?
See the yellow benchmark (matrix multiply). I suspect it's memory-related.
Re: Another Book on Data Science – Learn R and Python in Parallel
#93Earlier quoted context omitted.
As far as I can tell, R uses BLAS for matrix operations, and Python probably does the same, so in terms of efficiency I wouldn't expect a big difference between the two.
Both R and numpy use BLAS, and if both are linked to the same library, say OpenBLAS or Intel MKL, then performance is in fact almost identical for expensive operations like matrix multiplication. (R also ships with its own internal BLAS implementation, which is reliable but not very fast, and I believe is still single threaded, so the first thing you should do if you are using R and care about performance is to swap…
Re: Another Book on Data Science – Learn R and Python in Parallel
#94Core Python is fine. But pandas is an atrocious mess of object orientedness and other weird stuff.
Re: Another Book on Data Science – Learn R and Python in Parallel
#95Earlier quoted context omitted.
At the scale of what I'm doing the benchmarks don't sway me, but I do like the syntax of data.table - it feels a bit like relational algebra.
So then I would assume you must be working with tables of less than 1000 rows, because thats pretty much the only case where it doesn't matter. At anything more than 1k rows, the differences are substantial.
Re: Another Book on Data Science – Learn R and Python in Parallel
#96Earlier quoted context omitted.
It's a matter of ecosystem of packages. R has a huge number of packages for many fields. Python has fewer, but might work for particular use cases. I was excited for Julia, and played around with it since 0.2, but it really hasn't generated very many packages of note in my particular field (bioinformatics).
Pretty sure that Python has a larger total ecosystem of packages than R.