3 ms·
Nice post. R's quirks seem to put some people off but I've found that it's a relative joy for exploratory analysis and visualization like this, especially withi
by pneumic 2y ago
Nice post. R's quirks seem to put some people off but I've found that it's a relative joy for exploratory analysis and visualization like this, especially within RStudio.
Recently I was tasked with grouping a large number of DNA oligonucleotides, and exploring the criteria by which to group them was a lot of fun using various R libraries. In the span of a few days I learned how to use k-means clustering, how to employ an UpSet plot, and how to build a phylogenetic tree.
- tylermw 2y agoR is hands-down the best language for data manipulation, analysis, and visualization: it's a language truly centered around treating data as a first class citizen. That focus does make some traditional programming workflows more error prone (helpful interactive data analysis features like vector recycling, flexible automatic type conversion, and non-standard evaluation provide lots of footguns), but the last decade of language improvements (stringsAsFactors = FALSE!) and R packaging ecosystem improvements have made the situation much nicer. The flexibility and lispy expressiveness of the language make it really fun to develop in, once you've gotten over the initial quirks.
- pneumic 2y ago100% agree, especially on the lispy expressiveness. I love that I can build analysis pipelines in a functional style, which has always clicked with me more than other paradigms. Tidyverse is a godsend for at least getting initial data transformations sketched out and for gently introducing new users, but I do believe one should gain an understanding of how to do all of these things in plain R.
- steve1977 2y agoHave you used the Wolfram Language and if so, how would you compare the two?
- Breza 2y agoR gives you a relatively simple set of tools that you can combine in powerful ways. The Wolfram Language seems to have a specialized function for everything, which is nice sometimes but it takes me longer to get started when doing exploratory data analysis, since I have to remember more nuanced stuff. I absolutely love R. Once you get your head around data types and the 20 most important functions, you can do amazing things.
- tylermw 2y agoI have not. I started using R due to its open source codebase and ability to audit and understand exactly what its doing under the hood—being able to see how statistical formulae were implemented in code was invaluable in understanding and interpreting a package's analytical output.
- steve1977 2y agothx!
- rscho 2y agoI have. R is far less verbose and maps far better to data analysis. The Wolfram lang is far more expressive and powerful for symbolic computation. So basically, Wolfram for doing math Research, R for applied stats.
- steve1977 2y agothx!
- cjk2 2y agoIs there a decent tutorial or book on getting over the hill? I can do some basic stuff in it but it's just not catching like other languages do.
- tylermw 2y agoMy personal favorite resource is "R for Data Science" by Hadley Wickham. It covers lots of nice data manipulation and visualization examples, and provides a good introduction to the tidyverse, which is a particular dialect of R that's well-suited for data analysis. It's available for free at: https://r4ds.hadley.nz/ https://r4ds.hadley.nz/ For more specialized analytical methods there are lots of textbooks out there that provide a deep dive into packages for a specific field (e.g. survival analysis, machine learning, time series), but for general data manipulation and visualization it's hard to beat R4DS.
- napoleongl 2y agoAn option to the Hadley book that also covers some nice statistical methods is Statistical Rethinking by McElreath. Not really available for free though but interesting read.
- Cosi1125 2y ago[1] will give you a more programming language-focused perspective, as opposed to many other R books. -- [1] https://adv-r.hadley.nz/ https://adv-r.hadley.nz/
- dash2 2y agoI agree with this. I wonder what it would take to let R spread beyond its niche into a more popular data science language. My worry is that with polars coming along, Python is catching up where it's behind, and staying ahead where it is ahead.