@@ -72,6 +72,10 @@ The following searches in PyPI turned up nothing: log-linear model;
72
72
Poisson regression; instrumental variables; spatial
73
73
data; familywise error rate; etc.
74
74
75
+ This is not to say no Python libraries exist for these things; I am
76
+ simply saying that they are not found in PyPI, whereas they are easily
77
+ found in CRAN.
78
+
75
79
## Machine learning
76
80
77
81
* Slight edge to Python here* .
@@ -85,7 +89,7 @@ that matter, a pure-R version of TensorFlow could be developed.
85
89
Meanwhile, I would claim that R's package availability for random forests
86
90
and gradient boosting are outstanding.
87
91
88
- ## Statisical correctness
92
+ ## Statistical correctness
89
93
90
94
* Big win for R* .
91
95
@@ -126,7 +130,9 @@ In addition, R's new ALTREP idea has great potential for enhancing
126
130
performance and usability.
127
131
128
132
On the other hand, the Cython and PyPy variants of Python can in some
129
- cases obviate the need for explicit C/C++ interface in the first place.
133
+ cases obviate the need for explicit C/C++ interface in the first place;
134
+ indeed some would say Cython IS a C/C++ interface.
135
+
130
136
## Object orientation, metaprogramming
131
137
132
138
* Slight win for R* .
@@ -137,7 +143,7 @@ annoyed by the fact that I cannot print a function to the terminal,
137
143
which I do a lot in R.
138
144
139
145
Python has just one OOP paradigm. In R, you have your choice of
140
- several, though some may debate that this is a good thing.
146
+ several (S3, S4, R6 etc.) , though some may debate that this is a good thing.
141
147
142
148
Given R's magic metaprogramming features (code that produces code),
143
149
computer scientists ought to be drooling over R.
@@ -150,24 +156,35 @@ Python is currently undergoing a transition from version 2.7 to 3.x.
150
156
This will cause some disruption, but nothing too elaborate.
151
157
152
158
By contrast, R is rapidly devolving into two mutually unintelligible
153
- dialects, ordinary R and the Tidyverse. Sadly, this is a conscious
154
- effort by a commercial entity that has come to dominate the R world,
155
- RStudio. I know and admire the people at RStudio, but a commercial
156
- entity should not have such undue influence on an open-source project.
157
- In addition, it is causing tension among some leaders in the R world,
158
- which is very troubling to me.
159
+ dialects, ordinary R and the Tidyverse. I, as a seasoned R programmer,
160
+ cannot read Tidy code, as it calls numerous Tidyverse functions that I
161
+ don't know. Conversely, as one person in the Twitter discussion of this
162
+ document noted (approvingly), "One can code in the Tidyverse while
163
+ knowing very little R."
164
+
165
+ Note: In using the term "Tidyverse," I am not including pre-existing
166
+ projects by Hadley Wickham, e.g. ggplot2 (which I use a lot) and dplyr.
167
+ Instead, I am referring to things such as tibbles and pipes.
159
168
160
169
It might be more acceptable if the Tidyverse were superior to ordinary
161
170
R, but in my opinion it is not. It makes things more difficult for
162
171
beginners. E.g. the Tidyverse has so many functions, some complex, that
163
172
must be learned to do what are very simple operations in base R. Pipes,
164
173
apparently meant to help beginners learn R, actually make it more
165
174
difficult, I believe. And the Tidyverse is of questionable value for
166
- advanced users.
175
+ advanced users. See also [ "The Tidyverse Curse ] (The Tidyverse Curse).
167
176
168
- Note: In using the term "Tidyverse," I am not including pre-existing
169
- projects by Hadley Wickham, e.g. ggplot2 (which I use a lot) and dplyr.
170
- Instead, I am referring to things such as tibbles and pipes.
177
+ The Tidyverse is a conscious promotional effort by a commercial entity
178
+ that has come to dominate the R world, RStudio. I know and admire the
179
+ people at RStudio, * but a commercial entity should not have such undue
180
+ influence on an open-source project.*
181
+
182
+ In addition, it is causing tension among some leaders in the R world,
183
+ which is very troubling to me. For instance, when the lightning-fast
184
+ ** data.table** package came out, rather than welcoming it as a hugely
185
+ valuable contribution to R, RStudio treated it as a competitor,
186
+ downplaying it and promoting their own product, dplyr. This is simply
187
+ not healthy for an open-source language.
171
188
172
189
## Linked data structures
173
190
@@ -178,6 +195,15 @@ to implement in Python. While this can be done in R in various ways, it
178
195
is not as good. Not a big issue in Data Science, but it does come up in
179
196
some contexts.
180
197
198
+ ## Online help
199
+
200
+ * Big win for R.*
201
+
202
+ To begin with, R's basic ** help()** function is much more informative
203
+ than Python's. It's nicely supplemented by ** example()** . And most
204
+ important, the custom of writing vignettes in R packages makes R a
205
+ hands-down winner in this aspect.
206
+
181
207
## R/Python interoperability
182
208
183
209
RStudio is to be commended for developing the reticulate package, to
@@ -190,4 +216,5 @@ At present, I do not recommend writing mixed Python/R code.
190
216
191
217
## Thanks
192
218
193
- This document has benefited from various reader comments, notably from Dirk Eddelbuettel.
219
+ This document has benefited from various reader comments, notably from
220
+ Dirk Eddelbuettel, as well as Paul Hewson and Bob Muenchen.
0 commit comments