4 ms·
I can't recommend the "R for Data Science" (https://r4ds.had.co.nz https://r4ds.had.co.nz) book enough, which is written by one of the creators of the tidyverse
by funesrequiem 5y ago
I can't recommend the "R for Data Science" (https://r4ds.had.co.nz https://r4ds.had.co.nz) book enough, which is written by one of the creators of the tidyverse, Hadley Wickham. This opinion might get challenged here, but if you're going to use R primarily for data science/analysis and not for programming I think it's a better idea to start learning it with the tidyverse than with base R (beyond the basics, of course, which are also covered in the book).
I use R professionally for biostatistics and I can't remember the last time I had to use the base syntax because something couldn't be done with the tidyverse approach.
- deleted 5y ago[deleted]
- _jules 5y agoWould be interesting if you could expand. I've used r (data.table) extensively in the last years for biostatistics in a research organization. I was able to get away with not learning tidyverse and stick to data.table. Main reason for choosing data.table was speed - I'm working with tens of hundred of GB of data at once.
- tfehring 5y agoCompared to data.table, tidyverse offers significantly better readability and ergonomics in exchange for worse computational and memory efficiency, with the magnitude of the performance ranging from negligible to catastrophic depending on the operation and your data volume. At that data volume, you're probably doing some things that would OOM or hang for days if you translated your data.table code to the corresponding tidyverse code.
- vharuck 5y agoWhat's worked for me is reading Hadley Wickham's "Tidy Data" paper[0] and then applying the concepts with data.table. The speed is nice, but I really love what's possible with data.table syntax and how any packages work with it. That's opposed to what many people have decided "tidy" means, with non-standard evaluation and functions that take whole tables and symbols of column names instead of vectors. [0]: https://vita.had.co.nz/papers/tidy-data.html https://vita.had.co.nz/papers/tidy-data.html
- carlmcqueen 5y agodtplyr is an option as well which lets you use tidyverse syntax with data.table backend. Speed and syntax. If you learned data.table however, it's better to just stay in data.table. Nothing in the tidyverse can touch the efficiency of data table.