![]() Their main difference is that R has traditionally been geared towards statistical analysis, while Python is more generalist. R and Python are both open-source languages used in a wide range of data analysis fields. For me, R comes more natural as that is what I’m more fluent in, but I can see why Python holds an appeal too and I think I’ll make more of an effort to use both languages in my future projects. ![]() For plotting and visualisation I still think that R’s ggplot2 is top of the line in both syntax, customizability and outcome (admittedly, I don’t know matplotlib as well as ggplot)! In terms of functionality, I couldn’t find major differences between the two languages and I would say they both have their merits. While Python’s syntax is inherently cleaner/ tidier, we can use packages that implement piping in R and achieve similar results (even though Python’s dot-separated syntax is still much easier to type than using the piping operator of magrittr). ConclusionsĪll in all, the Python code could easily be translated into R and was comparable in length and simplicity between the two languages. That’s why I wanted to see how R and Python fare in a one-on-one comparison of an analysis that’s representative of what I would typically work with. ![]() But while R is my go-to, in some cases, Python might actually be a better alternative. I’m an avid R user and rarely use anything else for data analysis and visualisations.
0 Comments
Leave a Reply. |