r/rprogramming • u/[deleted] • Apr 17 '21
r/rprogramming • u/Throwymcthrowz • Nov 14 '20
educational materials For everyone who asks how to get better at R
Often on this sub people ask something along the lines of "How can I improve at R." I remember thinking the same thing several years ago when I first picked it up, and so I thought I'd share a few resources that have made all the difference, and then one word of advice.
The first place I would start is reading R for Data Science by Hadley Wickham. Importantly, I would read each chapter carefully, inspect the code provided, and run it to clarify any misunderstandings. Then, what I did was do all of the exercises at the end of each chapter. Even just an hour each day on this, and I was able to finish the book in just a few months. The key here for me was never EVER copy and paste.
Next, I would go pick up Advanced R, again by Hadley Wickham. I don't necessarily think everyone needs to read every chapter of this book, but at least up through the S3 object system is useful for most people. Again, clarify the code when needed, and do exercises for at least those things which you don't feel you grasp intuitively yet.
Last, I pick up The R Inferno by Pat Burns. This one is basically all of the minutia on how not to write inefficient or error-prone code. I think this one can be read more selectively.
The next thing I recommend is to pick a project, and do it. If you don't know how to use R-projects and Git, then this is the time to learn. If you can't come up with a project, the thing I've liked doing is programming things which already exist. This way, I have source code I can consult to ensure I have things working properly. Then, I would try to improve on the source-code in areas that I think need it. For me, this involved programming statistical models of some sort, but the key here is something that you're interested in learning how the programming actually works "under the hood."
Dove-tailed with this, reading source-code whenever possible is useful. In R-studio, you can use CTRL + LEFT CLICK on code that is in the editor to pull up its source code, or you can just visit rdrr.io.
I think that doing the above will help 80-90% of beginner to intermediate R-users to vastly improve their R fluency. There are other things that would help for sure, such as learning how to use parallel R, but understanding the base is a first step.
And before anyone asks, I am not affiliated with Hadley in any way. I could only wish to meet the man, but unfortunately that seems unlikely. I simply find his books useful.
r/rprogramming • u/fdren • Jan 12 '21
I am creating a 'Khan Academy' for R Programmers
I'm starting a not for profit site to create high quality R programming courses. I am starting with an R in Production course, where I will be teaching everything I wish I knew 7 years ago when I first started.
If you like, you can also sign up and create courses as well.
Feel free to check it out - the #rip course is a work in process.
r/rprogramming • u/jerburt • Dec 10 '20
Data Science Learning Resources
It was requested in the past to but together some resources for new R users. Below is a collection of everything I could find to help others out.
Data Science Learning Resources
Sections
Programming
Machine Learning
Leadership & Strategy
Programming
General
The Pragmatic Programmer (Book)
Clean Code (Book)
Architecture Playbook (Online guide)
Python
A Whirlwind Tour of Python (Book)
Python Tricks (Book)
Learning Python (Book)
Effective Python (Book)
R
R for Data Science (Book)
Advanced R (Book)
bookdown: Authoring Books and Technical Documents with R Markdown (Book)
Data Science in R: A Case Studies Approach to Computational Reasoning and Problem Solving (Book)
Introduction to Data Science (Book)
Spark
Spark: The Definitive Guide: Big Data Processing Made Simple (Book)
Mastering Spark with R: The Complete Guide to Large-Scale Analysis and Modeling (Book)
Command Line
The Missing Semester of Your CS Education (Online course)
Learning the bash Shell (Book)
The Art of the Command Line (GitHub resources)
explainshell.com (Online help)
Containers
Docker tips & tricks or just useful commands (Online article)
Rocker: R configurations for Docker (GitHub resources)
Docker and Python: making them play nicely and securely for Data Science and ML (PyCon Talk)
Functional Programming
An Introduction to the Basic Principles of Functional Programming (Online article)
R for Data Science, Ch. 21 (Book)
Advanced R, Ch. 9 (Book)
Jenny Bryan's purrr tutorials (Online tutorial)
Version Control
Excuse me, do you have a moment to talk about version control? (Paper)
Learn Git (Online tutorial)
Git Commit Message Style Guide (Online guide)
Code Packaging
Style Guide, Readability, Best Practices
The Art of Readable Code (Book)
The Tidyverse Style Guide (Online book)
PEP 8 -- Style Guide for Python Code (Online guide)
Guidelines for code reviews (README)
Code Review Best Practices (Blog post)
Testing
Testing R Code (Book)
Python Testing with pytest (Book)
Multiply your Testing Effectiveness with Parameterized Testing (PyCon Talk)
Test-Driven Development (Book)
Machine Learning
General
Applied Predictive Modeling (Book)
Deep Learning (Book)
Hands-On Machine Learning with Scikit-Learn & TensorFlow (Book | GitHub)
Unsupervised Modeling
ISLR: Ch. 10.3 Clustering Methods (Book chapter)
A K-Means Clustering Algorithm (Paper)
Generalized Low Rank Models (Paper)
Deep Learning Ch. 15 Autoencoders (Book chapter)
Hands-On Mach. Learning with Scikit-Learn Ch. 15 Autoencoders (Book chapter | GitHub resource)
Sparse autoencoder (Andrew Ng CS294A lecture notes)
A/B Testing
Lessons from Running Thoursands of A/B Tests (Online presentation with many references)
Peaking at A/B Tests (Paper)
Multi-armed Bandit (Online tutorial)
A Modern Bayesian Look at the Multi-armed Bandit (Paper behind above online tutorial)
Predicting Search Satisfaction Metrics with Interleaved Comparisons (Paper)
Evaluating Retrieval Performance using Clickthrough Data (Paper)
Multivariate Adaptive Regression Splines
Multivariate Adaptive Regression Splines (Friedman's original paper)
APM: Ch. 7.2 Multivariate Adaptive Regression Splines (Book chapter)
ESL: Ch. 9.4 Multivariate Adaptive Regression Splines (Book chapter)
Notes on the earth package (Paper)
K-Nearest Neighbor
k-Nearest neighbour classifiers (Paper)
APM: Ch. 7.4 & 13.5 K-Nearest Neighbors (Book chapter)
ESL: Ch. 13.3 k-Nearest-Neighbor Classifiers (Book chapter)
Random Forests
An Introduction to Recursive Partitioning Using the RPART Routines (Paper)
Random Forests - Leo Breiman's original research paper (Paper)
Gradient Boosting Machines
How to explain gradient boosting (Online tutorial)
Trevor Hastie - Gradient Boosting & Random Forests at H2O World 2014 (YouTube)
Mark Landry - Gradient Boosting Method and Random Forest at H2O World 2015 (YouTube)
Peter Prettenhofer - Gradient Boosted Regression Trees in scikit-learn at PyData London 2014 (YouTube)
Alexey Natekin1 and Alois Knoll - Gradient boosting machines, a tutorial (Paper)
Deep Learning
Deep Learning with R (Book)
Deep Learning with Python (Book)
Deep Learning Specialization (MOOC)
keras.rstudio.com (Online articles & tutorials)
blogs.rstudio.com/tensorflow (Online articles & tutorials)
Understanding LSTMs (Blog)
The Unreasonable Effectiveness of Recurrent Neural Networks (Blog)
Revisiting Small Batch Training for Deep Neural Networks (Paper)
On Loss Functions for Deep Neural Networks in Classification (Paper)
Practical Recommendations for Gradient-Based Training of Deep Architectures (Paper)
Efficient BackProp (Paper)
Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification (Paper)
Cyclical Learning Rates for Training Neural Networks (Paper)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks (Paper)
Ensembles / Model Stacking / Super Learners
Stacked Regressions (Paper)
Super Learner (Paper)
Natural Language Processing / Text Mining
Text Mining with R (Book)
Probabilistic Topic Models (Paper)
The Illustrated Word2vec (Online tutorial)
Sebastian Ruder's series on Word Embeddings (Online articles & tutorials)
Tuning
Hyperparameters and Tuning Strategies for Random Forest (Paper)
Tunability: Importance of Hyperparameters of Machine Learning Algorithms (Paper)
Machine Learning Benchmarks and Random Forest Regression (Paper)
Feature Engineering
Feature Selection
APM: Ch. 19 An Introduction to Feature Selection (Book chapter)
Machine Learning Interpretability
H2O.ai Machine Learning Interpretability Resources (GitHub resources)
Patrick Hall's Awesome Machine Learning Interpretability Resources (GitHub resources)
Visualizing the Feature Importance for Black Box Models (Paper)
A Simple and Effective Model-Based Variable Importance Measure (Paper)
pdp: An R Package for Constructing Partial Dependence Plots (Paper)
"Why Should I Trust You?": Explaining the Predictions of Any Classifier (Paper)
A Unified Approach to Interpreting Model Predictions (Paper)
Consistent Individualized Feature Attribution for Tree Ensembles (Paper)
On the Art and Science of Machine Learning Explanations (Paper)
Explanation in artificial intelligence: Insights from the social sciences (Paper)
Please Stop Permuting Features: An Explanation and Alternatives (Paper)
A Stratification Approach to Partial Dependence for Codependent Variables (Paper)
Explaining Machine Learning Classifiers through Diverse Counterfactual Examples (Paper)
Auto ML
A Review of Automatic Selection Methods for Machine Learning Algorithms and Hyperparameter Values (Paper)
Learning Multiple Defaults for Machine Learning Algorithms (Paper)
Benchmarking
Szilard Pafka's ML Benchmarking Research (GitHub resources)
Data-driven advice for applying machine learning to bioinformatics problems (Paper)
Resampling Procedures
Futility Analysis in the Cross-Validation of Machine Learning Models (Paper)
Estimating Classification Error Rate: Repeated Cross-validation, Repeated Hold-out, and Bootstrap (Paper)
Productionalization
150 Successful Machine Learning Models: 6 Lessons Learned at Booking.com (Paper)
Deep Learning in Production (Github resources)
Leadership & Strategy
r/rprogramming • u/baseRbestR • Jul 02 '21
Can we please ban users who abuse this sub to enhance their search engine ranking?
There is a certain user who will, for now, remain unnamed who regularly posts links to their low quality R tutorials in order to acquire many inbound links, this boosting their ranking in Google search results for anything R related.
If the content were high quality I would not take that much umbrage with the behaviour, but they seem less adept at using R than most off my undergraduate students after their first R course.
I feel this person is actively harming the R community by attempting to forcefully impose themselves as a prominent R user, particularly give the exceptionally low quality of their "tutorials."
We should not continue to allow this person or any others who may follow in the future, to take advantage of this subreddit for their personal gain.
r/rprogramming • u/[deleted] • Feb 11 '25
What R packages you can't live without
Obviously, a person working in finance would have different needs than someone in biostatistics. But it'd be cool to know what packages you use with a brief description of what you use it for.
r/rprogramming • u/AtivittiAi • Nov 12 '18
20 Best Libraries for Data Science in R Programming
r/rprogramming • u/Albotmcrobit • Feb 29 '20
Happy 20th birthday to R 1.0.0! CelebRation2020 Copenhagen
r/rprogramming • u/[deleted] • Aug 25 '21
We are joining the protest against Reddit inaction on covid misinformation subreddits
reddit.comr/rprogramming • u/[deleted] • Dec 10 '21
I am concerned about the tidyverse and it’s impact on the R community and language.
Hello, I am a long time R user, about 15 years. I am a base R user, although I admit, I do use ggplot2 and shiny. I teach doctoral R programming courses and hold frequent workshops.
A trend I have noticed is that more and more of my students entering my course are unable to follow my syntax. They increasingly ask me where are the pipes?!
I must admit I really dislike the pipe. It’s only purpose is to change the reading and writing style of the human interaction with syntax. This is leading to a sharp fracture in the community.
I have students who cant follow programming from the inside out, they want to read left to right like it’s some form of English.
I guess… I respect Hadly and the tidy mission to make the language more accessible. That said, I think it’s having the opposite effect. A fractured community with sub languages so different that both sides can’t understand one another.
I love R, I always start my semester by jokingly telling students R is more of a lifestyle than a language.
I just wanted to hear some thoughts. When I repeat this to colleagues I get mixed responses, almost always culminating in “but really who cares”…. I care!
r/rprogramming • u/milkandhoneycrisp • Jan 21 '21
R color palette inspired by the amazing women at today's inauguration!
r/rprogramming • u/7182818284590452 • Aug 02 '24
Making a living with R
I have been working as a Data Scientist for about 9 years and have an M.S. in stats. Currently a Lead Data Scientist. I am good at programming in both R and python, but strongly prefer R over python.
Broadly, has anyone made a living with R in Data Science? If so, how? What industry are you in? Is your official title Data Scientist?
R seems to be making ground on SAS in clinical trials. Besides working in this industry, I don't see a path forward to making a living with R.
Edit: I have had only one job that used R and we transitioned to python going forward. I ended up learning python out of necessity, not desire.
r/rprogramming • u/[deleted] • Jul 30 '22
I was really hoping this sub would be called r/r
r/rprogramming • u/tofu-drifter • Aug 17 '24
Could I be the youngest person to ever create an R Package uploaded to CRAN?
Good day, I spent my summer break learning R and making my own package, and I successfully created one. Of course the next reasonable thing to do was to upload it to CRAN, so I did. And today, after several submissions, I finally got an email stating that they will manually check it.
So, I'm in 8th Grade and I was wondering if there was a possibility of me becoming the youngest one to do this. Thanks!
r/rprogramming • u/JoachimSchork • Dec 01 '20
700 Free R Programming Tutorials
I've just published the 700th (!) tutorial on my R programming and statistics learning platform https://statisticsglobe.com/. Please check it out in case you want to learn R for free. :)
r/rprogramming • u/wTVd0 • Jun 17 '21
"[O]ne of the joys of using R [...] is the active and vibrant user community"
r/rprogramming • u/gimmis7 • Sep 25 '22
I found R too difficult, but with tidyverse, I have changed my mind
I had to use R at my new job and was frustrated, as I didn't find it intuitive at all (I liked pandas way more). However, that was before I started using the tidyverse library.
If there are other struggling R newbies out there, here is an article about what tidyverse is all about and how it is linked to SQL tidyverse intro 🙂
r/rprogramming • u/JoachimSchork • Jul 31 '20
100 R tutorials in 15 Days - Programming Challenge Finished!
I've just finished a programming challenge where I created 100 R tutorials on my homepage https://statisticsglobe.com/. It took me exactly 15 days, 80 hours, 23 minutes, and 06 seconds to finish, so I hope you like the results! :D Please find a list of all tutorials below:
https://statisticsglobe.com/correlation-matrix-in-r
https://statisticsglobe.com/display-large-numbers-separated-with-comma-in-r
https://statisticsglobe.com/zoom-into-ggplot2-plot-without-removing-data-in-r
https://statisticsglobe.com/read-files-directory-apply-function-to-each-data-frame-in-r
https://statisticsglobe.com/subset-of-data-frame-rows-containing-na-in-r
https://statisticsglobe.com/remove-all-special-characters-from-string-in-r
https://statisticsglobe.com/remove-first-row-of-data-frame-in-r
https://statisticsglobe.com/convert-character-string-to-date-object-in-r
https://statisticsglobe.com/fit-smooth-curve-to-plot-of-data-in-r
https://statisticsglobe.com/convert-unix-timestamp-to-date-object-in-r
https://statisticsglobe.com/select-rows-with-partial-string-match-in-r
https://statisticsglobe.com/unique-combinations-of-all-elements-from-two-vectors-in-r
https://statisticsglobe.com/export-nicely-formatted-data-frame-in-r
https://statisticsglobe.com/disable-messages-when-loading-a-package-in-r
https://statisticsglobe.com/randomly-reorder-data-frame-by-row-and-column-in-r
https://statisticsglobe.com/ggplot2-title-subtitle-with-different-size-and-color-in-r
https://statisticsglobe.com/suppress-output-of-command-in-r
https://statisticsglobe.com/paste-multiple-columns-together-in-r
https://statisticsglobe.com/compute-eulers-number-in-r
https://statisticsglobe.com/change-spacing-of-axis-tick-marks-in-base-r-plot
https://statisticsglobe.com/round-up-to-nearest-10-or-100-in-r
https://statisticsglobe.com/find-position-of-character-in-string-in-r
https://statisticsglobe.com/print-time-with-milliseconds-in-r
https://statisticsglobe.com/find-values-contained-in-first-vector-but-not-another-in-r
https://statisticsglobe.com/overlay-density-plots-in-base-r
https://statisticsglobe.com/repeat-rows-of-data-frame-n-times-in-r
https://statisticsglobe.com/quit-restart-clean-r-session-from-within-r
https://statisticsglobe.com/skip-loop-to-next-iteration-in-r
https://statisticsglobe.com/left-align-text-in-ggplot2-plot-in-r
https://statisticsglobe.com/convert-vector-to-list-in-r
https://statisticsglobe.com/report-missing-values-in-data-frame-in-r
https://statisticsglobe.com/set-ggplot2-axis-limit-only-on-one-side-in-r
https://statisticsglobe.com/return-column-name-of-largest-value-for-each-row-in-r
https://statisticsglobe.com/remove-multiple-data-objects-using-rm-function-in-r
https://statisticsglobe.com/convert-characters-in-data-frame-to-uppercase-in-r
https://statisticsglobe.com/add-count-labels-on-top-of-ggplot2-barchart-in-r
https://statisticsglobe.com/extract-numbers-from-character-string-vector-in-r
https://statisticsglobe.com/apply-function-to-data-table-in-each-specified-column-in-r
https://statisticsglobe.com/specify-column-names-for-x-y-when-joining-with-dplyr-package-in-r
https://statisticsglobe.com/convert-data-frame-to-data-table-in-r
https://statisticsglobe.com/remove-multiple-columns-from-data-table-in-r
https://statisticsglobe.com/get-column-index-in-data-frame-by-variable-name-in-r
https://statisticsglobe.com/fix-aspect-ratio-in-ggplot2-plot-in-r
https://statisticsglobe.com/plot-all-columns-of-data-frame-in-r
https://statisticsglobe.com/reset-par-to-default-values-in-r
https://statisticsglobe.com/control-size-of-ggplot2-legend-items-in-r
https://statisticsglobe.com/r-save-all-console-input-output-to-file
https://statisticsglobe.com/r-split-data-frame-into-list-of-data-frames-based-on-id-column
https://statisticsglobe.com/extract-data-table-column-as-vector-using-index-position-in-r
https://statisticsglobe.com/set-area-margins-of-ggplot2-plot-in-r
https://statisticsglobe.com/change-y-axis-to-percentages-in-ggplot2-barplot-in-r
https://statisticsglobe.com/count-number-of-words-in-character-string-in-r
https://statisticsglobe.com/insert-new-column-between-two-data-frame-variables-in-r
https://statisticsglobe.com/sort-variables-of-data-frame-by-column-names-in-r
https://statisticsglobe.com/remove-empty-rows-of-data-frame-in-r
https://statisticsglobe.com/create-comma-separated-vector-in-r
https://statisticsglobe.com/randomize-vector-in-r
https://statisticsglobe.com/split-data-frame-in-r
https://statisticsglobe.com/indexing-up-to-the-end-of-vector-data-frame-in-r
https://statisticsglobe.com/replace-multiple-letters-with-accents-in-r
https://statisticsglobe.com/select-first-row-of-each-group-in-data-frame-in-r
https://statisticsglobe.com/select-first-element-of-nested-list-in-r
https://statisticsglobe.com/arrange-list-of-ggplot2-plots-in-r
https://statisticsglobe.com/multiply-rows-of-matrix-by-vector-in-r
https://statisticsglobe.com/replace-values-in-data-frame-conditionally-in-r
https://statisticsglobe.com/create-data-frame-where-a-column-is-a-list-in-r
https://statisticsglobe.com/sum-across-multiple-rows-columns-using-dplyr-package-in-r
https://statisticsglobe.com/extract-just-number-from-named-numeric-vector-in-r
https://statisticsglobe.com/ggplot2-plot-in-script-is-not-displayed-in-r
https://statisticsglobe.com/change-display-order-of-ggplot2-plot-legend-in-r
https://statisticsglobe.com/save-plot-in-data-object-in-base-r
https://statisticsglobe.com/unique-rows-of-data-frame-based-on-selected-columns-in-r
https://statisticsglobe.com/draw-multiple-lattice-plots-in-one-window-in-r
https://statisticsglobe.com/convert-named-vector-to-data-frame-in-r
https://statisticsglobe.com/use-apply-function-only-for-specific-data-frame-columns-in-r
https://statisticsglobe.com/check-existence-of-local-file-in-r
https://statisticsglobe.com/remove-gridlines-in-ggplot2-plot-in-r
https://statisticsglobe.com/coerce-list-object-to-type-double-in-r
https://statisticsglobe.com/create-sequence-of-repeated-values-in-r
https://statisticsglobe.com/select-multiple-elements-from-list-in-r
https://statisticsglobe.com/undefined-columns-selected-when-subsetting-data-frame-in-r
https://statisticsglobe.com/dplyr-mutate-function-with-logical-condition-in-r
https://statisticsglobe.com/change-colors-in-ggplot2-line-plot-in-r
https://statisticsglobe.com/keep-unused-factor-levels-in-ggplot2-barplot-in-r
https://statisticsglobe.com/number-of-months-between-two-dates-in-r
https://statisticsglobe.com/drop-multiple-columns-from-data-frame-using-dplyr-package-in-r
https://statisticsglobe.com/combine-two-ggplot2-plots-from-different-data-frames-in-r
https://statisticsglobe.com/determine-path-of-current-script-in-r
https://statisticsglobe.com/extract-regression-coefficients-of-linear-model-in-r
https://statisticsglobe.com/draw-time-series-plot-with-events-using-ggplot2-in-r
https://statisticsglobe.com/count-number-of-rows-by-group-using-dplyr-package-in-r
https://statisticsglobe.com/reorder-facets-in-ggplot2-plot-in-r
https://statisticsglobe.com/combine-multiple-ggplot2-legends-in-r
https://statisticsglobe.com/display-only-integer-values-on-ggplot2-axis-in-r
https://statisticsglobe.com/get-second-sub-element-of-every-list-element-in-r
https://statisticsglobe.com/merge-unequal-data-frames-replace-na-with-0-in-r
https://statisticsglobe.com/annotate-text-outside-of-ggplot2-plot-in-r
https://statisticsglobe.com/control-point-border-thickness-of-ggplot2-plot-in-r
https://statisticsglobe.com/two-functions-with-same-name-in-different-packages-in-r
https://statisticsglobe.com/convert-data-frame-with-date-column-to-time-series-object-in-r