3 ms·
R still looks pretty much the same to me when I look at the code on kaggle, stack exchange, etc. Can you share where you have seen this expert R use and/or what
by nonbel 10y ago
R still looks pretty much the same to me when I look at the code on kaggle, stack exchange, etc. Can you share where you have seen this expert R use and/or what use cases?
- minimaxir 10y agoMost modern R usage I've seen, even on Kaggle, has used margittr/dplyr since it's orders of magnitudes faster/easier than the base functions. (i.e. I almost quit R in favor for Python without those two) A quick example of my own notebook which uses margittr/dplyr heavily to process Stack Overflow survey data: https://github.com/minimaxir/stack-overflow-survey/blob/master/stack_overflow_dev_survey.ipynb https://github.com/minimaxir/stack-overflow-survey/blob/mast...
- nonbel 10y agoThanks for the example code, it actually has me wondering whether using the pipes has any impact on performance. They are much easier to read than the nested function calls that would be used instead. However, I mean I just searched for an R script on kaggle and the first I found is this: https://www.kaggle.com/bpavlyshenko/grupo-bimbo-inventory-demand/bimbo-xgboost-r-script-lb-0-457/output https://www.kaggle.com/bpavlyshenko/grupo-bimbo-inventory-de... From my experience that is a typical example (data.table is very common, but not so much dplyr and the pipes). I looked through the recent/featured questions on stack overflow and cross validated and saw only "old school" R as well. For example: http://stats.stackexchange.com/questions/228800/ http://stats.stackexchange.com/questions/228800/