Open farcego opened 5 years ago
Biologist here, agreeing with most of the above.
Regarding transferability, my first practical contact with SQL-like syntax was withion the tidyverse - and I found this very much transferable.
Came to using tidyverse packages through ggplot2, which was hard to learn and broke my code with the change from opts() to themes, but in the end was very much faster and easier to read when I needed to change figures for different purposes. Then learned about magrittr, and stringi, and now am using piped code using tidyverse packages on a monthly basis.
Also, not being an english native speaker, I can easily see why people find the verb-based system of the tidyverse easier to learn. OTH, IMO the workings behind the code are opaque, and someone starting to learn R should not start with the tidyverse before understanding some base R.
Good article. I'm also not a computer scientist. I'm a transportation analyst and modeler. I learned base R over 20 years ago - when I was in my mid-40s - from reading Phil Spector's S book. I was and still am impressed with how simple it is to do things in base R if you understand the basic data structures, the ways of indexing, several apply family functions (including the marvelous tapply function), and how to define a function. Maybe it just clicked with me, but I don't think that base R is complicated if you stick to using a relatively small set of functions. You can do a lot with just a few functions and the power of indexing. Doing so also makes it easier to jump back into R and previous work you've done if you have a break from programming. I find complexity in R stems from the multiple ways that people do things using specialty functions rather than from the basic structure of R. In my view the Tidyverse increases the complexity of the language and well as bloats applications by the requiring the installation of many packages.
I suggest adding an indexing example. I often use indexing to do recoding of variables such as the example of recoding number of cylinders from numbers to words. Indexing can substitute for if else, switch, or case_when.
Dear Norman. This is a great post, expanded and discussed, much better than the twitterwars....
I think the point of being tidverse easier is fair, not for you. You are a CS professor and deal most of your time with CS students or CS pals. I think the big deal of TV and the use of English verbs is that is very easy for non CS, and for those that are not willing to became. Many people in the world have their life and passions, and jobs, but don't want to spend a second on learning programming etc... People that can be chemist, biologists etc. For them the use of a languaje programming to just get a statistical analysis is a pain in the arse. They were the classic SPSS users (or any similar canned goo). For those that want to use, but not to learn, but have to reuse sometimes, the English style will be more useful. I also think that RStudio IDE is great for newbies, it makes things easier than for example VIM (your choice) or emacs + ESS (my choice) as many people aren't CS or are willing to became or deal with "obfuscated" keybindings to became productive. I do struggle a lot when helping people that use tidyverse, because I don't know (the same with ggplot, I just use base R or specific tools for plotting rasters etc), but I see why the claim that Tisyverse is easier. You have to have in mind people that goes to use R a few times a year, not every day (like me). At the end is the individual perspective... so many people around will blame loops for everything. I have started to give up some *ply functions for R base, because for me a loop is an elegant way to do the same thing, is elegant, and is of course a transferable knowledge. My biggest point against tidyverse is that it is not transferable. If someone learns how to loop, it can easily modify and adapt for a different language, bur you cannot transfer tidyverse knowledge to other programming languages. I reckon you missed that point, which is important in a moving world.... tranferability of knowledge!!
also about learning, there are hips of tutorials, very good info, and even books (Hadley's books are really didactic), for those who learned R in the previous decade, we didn't have that luxury sometimes (the only r book I ever buy is yours, The art of R programming) cheers