| I strongly disagree. And in general, it seems like poor quality code in science is often not because of the language, but because scientists rarely lose their jobs when code breaks. There are many books that cover how to develop in R in detail, and they are no less thorough than treatments of the subject in other languages (e.g. Hadley's books are as good as any I've read for python). Many issues around inconsistency, etc, in language design (mostly how base functions / data types behave) have very clean, consistent implementations in libraries like rlang. The main differences I see when comparing R vs python package code, that affect style are... 1. Most R operations are immutable. 2. R often uses single dispatch, rather than putting methods on a class object. 3. In R, vectorised behavior is often the norm. 4. R functions can choose to use lazy evaluation (it usually very clear when this happens in e.g. tidyverse packages). These issues are covered in detail in books like Hadley's Advanced R. |
My hat off to him though!
As for the language ... consider this: lapply(), sapply(), tapply(), vapply() each does something different. The language allows two kinds of assignment operators even: a=1 or a <- 1 that are "almost" identical ... good luck, here is a language there are two ways to even assign a value to a name.