7 ms·
I skimmed through the book, and think it does a very poor job at showcasing how R and Python are juxtaposed in industry. To be fair, the book advertises showin
by clarityPhone 7y ago
I skimmed through the book, and think it does a very poor job at showcasing how R and Python are juxtaposed in industry.
To be fair, the book advertises showing R and Python code side-by-side. And that’s what it does. But it does it unlike how the languages are most often used in industry.
As a quick example, I saw no tidyverse code, which is essentially the only thing keeping R in the game. Learning R from this book won’t prepare you for writing R in most R shops.
I don’t see the utility in knowing how to do the same thing in both python and R if you’re a beginner. This is even more true if you’re not taking advantage of the strengths/weaknesses of either language.
Instead, just learn one of the languages well, and then learn the other well. Shallow dives in both will make you weak in both.
Unfortunately, 90% of data science content seems to be geared at beginners.
- ackbar03 7y agoThat's pretty much the only group of people who will use this though. Those that are serious about it or have some background won't really look at another book on data science and probably do the necessary research themselves
- thomasfedb 7y agoIs tidyverse really the only option? I'm a big fan of data.table + magrittr as a very powerful data munging combo.
- notafraudster 7y agomagrittr is part of the tidyverse, but I agree that data.table is a comparably powerful and sometimes faster option versus dplyr.
- Bootvis 7y agomagrittr existed before the tidyverse and can be used on standalone perfectly fine. In all benchmarks I've seen data.table is faster than dplyr on all tasks. Curious to see other results.
- thomasfedb 7y agoAt 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.
- RosanaAnaDana 7y agoSo 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.
- thomasfedb 7y agoHundreds of rows is about usual for me. I do analysis on clinical studies with human participants. Nothing too tricky, most of my munging runs in effectively zero time.
- creddit 7y agoAlmost always faster, actually. https://github.com/Rdatatable/data.table/wiki/Benchmarks-:-Grouping https://github.com/Rdatatable/data.table/wiki/Benchmarks-:-G...
- RosanaAnaDana 7y agoI was going to make this point, but yeah. The only thing I think people have a bit of a time with is how you do operations in data.table. If you are coming from plyr/dplyr, the transition can be difficult. However, I've found that the more I do, the more I prefer it, inspite of the fact that the main reason I use dt over tidy is the phenomenal performance gain.
- RosanaAnaDana 7y agoThis is what I've got my crew running. Tidyverse is basicly worthless once you hit a certain scale of data. If you've got datatables representing. List functionality within datatable is blazingly fast. Faster than anything else I've seen in python or R.
- wjn0 7y agoI 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 because anything more advanced isn't best described as data science. As soon as you get beyond the initial stages of data analysis (cleaning and processing data), you're doing something best described as some other word (statistics, machine learning, etc.) - although, granted, there isn't much content in these areas if you don't know _exactly_ what you're looking for.
- cwyers 7y agoEven 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.
- zelda_1 7y ago`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).
- cwyers 7y agoUsing classes at all is unnecessary for most R users. R is really, to the extent that paradigms matter to the average R user at all (which is: not much) a functional-first language. The idiomatic way to deal with the things you would use classes for is to use functions and closures. There are people who need objects in R, which is why R has object systems available, but it is of no help to a beginner to know them -- it doesn't help them to interact with the code they are going to see, and they don't have the background to understand why you would use classes instead of functions.
- bryanrasmussen 7y agoTheodore Sturgeon update: 90% of all programming books are geared at beginners.
- dlphn___xyz 7y agoany suggestions for intermediate-advanced level articles outside of distill?
- KKPMW 7y ago> tidyverse code, which is essentially the only thing keeping R in the game From my experience this is not the case. In biomedicine and bioinformatics few people actually use tidyverse because the data is much better represented as a matrix, and not in the "tidy" form. Outside of that corporations (well at least 2 I contracted with) used `data.table` explicitly. Join 3 ad-click dataframes matching by userID, sessionID and closest possible time-point - that's one line in `data.table`. Tidyverse is well suited for learning and for managing (relatively) simple datasets. But becomes cumbersome for more complex data. It can be used for those data too of course, just that it will be adding ad-hoc solutions and maybe get in a way more than help.
- zelda_1 7y agoI have a similar feeling. And that is why I spent one whole chapter in data.table (and pandas). Hope more R users would like to learn and use data.table.
- anthony_doan 7y agoI agree with your experiences. I've only use base R for my medical data (subsetting dataframe and such). Very rarely do I need tidy and also I find the pipe operator makes debugging harder. If and when I need it I'll use it that's that. I think R have much more packages in medical, especially statistical packages, where many fields within medical cares about inferences not just prediction/forecasting. So I disagree with the "essentially the only thing keeping R in the game". The breath of packages in R is one of the many things that keep R in the game. The tribalism and highly bias comments makes it very toxic and harder to have an honest discord. They are just tools, use what makes you happy and get the job done.