# r-statistics.co > R programming tutorials for advanced statistics, machine learning, and data visualization. Free, in-depth guides with reproducible R code examples. Many tutorials feature interactive code blocks powered by WebR that run directly in the browser. ## Site Info - Author: Selva Prabhakaran - Domain: r-statistics.co - Topics: R programming, statistics, machine learning, data visualization, ggplot2, regression, time series - Content type: Technical tutorials with runnable R code - Total tutorials: 69 - License: Creative Commons BY-NC 3.0 ## Topic Categories ### R Fundamentals (17 tutorials) - [R Programming Tutorial - Learn R for Data Science in 2026](https://r-statistics.co/R-Tutorial.html) - [R Data Types: Which Type Is Your Variable? (And Why It Matters)](https://r-statistics.co/R-Data-Types.html) - [R Vectors: The Foundation of Everything in R (Master This First)](https://r-statistics.co/R-Vectors.html) - [R Lists: When Data Frames Aren't Flexible Enough (Complete Guide)](https://r-statistics.co/R-Lists.html) - [R Matrices: Fast Linear Algebra Operations That Data Frames Can't Do](https://r-statistics.co/R-Matrices.html) - [R Data Frames: Every Operation You'll Need, With 10 Real Examples](https://r-statistics.co/R-Data-Frames.html) - [R Factors: The Data Type That Trips Up Almost Every R Beginner](https://r-statistics.co/R-Factors.html) - [R Control Flow: if/else, for, and while — Stop Avoiding Loops](https://r-statistics.co/R-Control-Flow.html) - [Write Better R Functions: Arguments, Defaults, Scope & When to Vectorise](https://r-statistics.co/R-Functions.html) - [R Subsetting: One Definitive Rule for [], [[]], $, and @ — No More Guessing](https://r-statistics.co/R-Subsetting.html) - [R Syntax 101: Write Your First Working Script in 10 Minutes](https://r-statistics.co/R-Syntax-101.html) - [R's Four Special Values: NA, NULL, NaN, Inf — What Each One Actually Means](https://r-statistics.co/R-Special-Values.html) - [R Type Coercion: Why Your Numeric Columns Silently Turn Into Characters](https://r-statistics.co/R-Type-Coercion.html) - [R Attributes: The Hidden Metadata That Makes R Objects Behave Differently](https://r-statistics.co/R-Attributes.html) - [Why R Copies Your Data (And How Copy-on-Modify Actually Saves Memory)](https://r-statistics.co/R-Copy-on-Modify.html) - [R Project Structure: The Setup That Eliminates setwd() Forever](https://r-statistics.co/R-Project-Structure.html) - [Stuck in R? 6 Ways to Get Unstuck Without Wasting Hours](https://r-statistics.co/Getting-Help-in-R.html) ### R Setup & Tools (5 tutorials) - [Install R & RStudio in 2026: The Setup That Actually Works First Time](https://r-statistics.co/Install-R-and-RStudio-2026.html) - [RStudio in 15 Minutes: The Only IDE Tour You'll Ever Need](https://r-statistics.co/RStudio-IDE-Tour.html) - [Positron vs RStudio in 2026: Should You Switch? A Feature-by-Feature Verdict](https://r-statistics.co/Positron-vs-RStudio.html) - [Run Multiple R Versions Side-by-Side (and Switch Without Breaking Anything)](https://r-statistics.co/Multiple-R-Versions.html) - [Is R Worth Learning in 2026? An Honest, Evidence-Based Answer](https://r-statistics.co/Is-R-Worth-Learning-in-2026.html) ### Exercises (9 tutorials) - [R Basics Exercises: 15 Practice Problems for Beginners (With Solutions)](https://r-statistics.co/R-Basics-Exercises.html) - [R Vectors Exercises: 12 Hands-On Problems with Step-by-Step Answers](https://r-statistics.co/R-Vectors-Exercises.html) - [R Lists Exercises: 10 Practice Problems with Full Solutions](https://r-statistics.co/R-Lists-Exercises.html) - [R Data Frames Exercises: 15 Practice Questions (Beginner to Advanced — Solved Step-by-Step)](https://r-statistics.co/R-Data-Frames-Exercises.html) - [R Functions Exercises: 10 Problems — Write, Debug & Optimize Functions — Solved Step-by-Step](https://r-statistics.co/R-Functions-Exercises.html) - [R Control Flow Exercises: 12 if/else, Loop & Function Practice Problems — Solved Step-by-Step](https://r-statistics.co/R-Control-Flow-Exercises.html) - [R String Manipulation Exercises: 10 stringr Practice Problems Solved](https://r-statistics.co/R-String-Exercises.html) - [R Date & Time Exercises: 10 lubridate Practice Problems with Solutions](https://r-statistics.co/R-Date-Time-Exercises.html) - [R apply Family Exercises: 12 apply(), lapply(), sapply() Practice Problems — Solved Step-by-Step](https://r-statistics.co/R-Apply-Exercises.html) ### Data Visualization (ggplot2) (5 tutorials) - [ggplot2 Tutorial - Data Visualization in R with Examples](https://r-statistics.co/ggplot2-Tutorial-With-R.html) - [ggplot2 Tutorial Part 1 - Build Beautiful Plots in R](https://r-statistics.co/Complete-Ggplot2-Tutorial-Part1-With-R-Code.html) - [ggplot2 Tutorial Part 2 - Customize Themes and Appearance](https://r-statistics.co/Complete-Ggplot2-Tutorial-Part2-Customizing-Theme-With-R-Code.html) - [Top 50 ggplot2 Visualizations - The Master List with Code](https://r-statistics.co/Top50-Ggplot2-Visualizations-MasterList-R-Code.html) - [ggplot2 Cheatsheet - Quick Reference for R Visualization](https://r-statistics.co/ggplot2-cheatsheet.html) ### Regression & Statistical Modeling (16 tutorials) - [Linear Regression in R - A Complete Step-by-Step Guide](https://r-statistics.co/Linear-Regression.html) - [Logistic Regression in R - A Complete Tutorial with Code](https://r-statistics.co/Logistic-Regression-With-R.html) - [Assumptions of Linear Regression - How to Test in R](https://r-statistics.co/Assumptions-of-Linear-Regression.html) - [Ridge Regression in R - Regularization Tutorial with Code](https://r-statistics.co/Ridge-Regression-With-R.html) - [Lasso Regression in R - Regularization with Examples](https://r-statistics.co/Lasso-Regression-With-R.html) - [Robust Regression in R - Handle Outliers Effectively](https://r-statistics.co/Robust-Regression-With-R.html) - [Beta Regression in R - Tutorial with Practical Examples](https://r-statistics.co/Beta-Regression-With-R.html) - [Probit Regression in R - Tutorial with Worked Examples](https://r-statistics.co/Probit-Regression-With-R.html) - [Ordinal Logistic Regression in R - Step-by-Step Guide](https://r-statistics.co/Ordinal-Logistic-Regression-With-R.html) - [Multinomial Logistic Regression in R - Complete Tutorial](https://r-statistics.co/Multinomial-Regression-With-R.html) - [Poisson and Negative Binomial Regression in R - Tutorial](https://r-statistics.co/Poisson-and-Negative-Binomial-Regression-With-R.html) - [Dirichlet Regression in R - A Step-by-Step Tutorial](https://r-statistics.co/Dirichlet-Regression-With-R.html) - [Isotonic Regression in R - Tutorial with Code Examples](https://r-statistics.co/Isotonic-Regression-With-R.html) - [Kernel Regression in R - Nonparametric Smoothing Guide](https://r-statistics.co/Kernel-Regression-With-R.html) - [Loess Regression in R - Local Smoothing with Examples](https://r-statistics.co/Loess-Regression-With-R.html) - [Advanced Regression Models in R - A Practical Overview](https://r-statistics.co/adv-regression-models.html) ### Machine Learning (4 tutorials) - [Support Vector Machines in R - SVM Tutorial with Examples](https://r-statistics.co/Support-Vector-Machines-With-R.html) - [Clustering in R - Methods, Examples, and Best Practices](https://r-statistics.co/Clustering-with-R.html) - [Association Rule Mining in R - Complete Guide with Examples](https://r-statistics.co/Association-Mining-With-R.html) - [Markov Chains in R - Tutorial with Practical Examples](https://r-statistics.co/Markov-Chain-With-R.html) ### Statistics (7 tutorials) - [Statistical Tests in R - A Comprehensive Reference Guide](https://r-statistics.co/Statistical-Tests-in-R.html) - [Missing Value Treatment in R - Imputation Techniques Guide](https://r-statistics.co/Missing-Value-Treatment-With-R.html) - [Outlier Detection and Treatment in R - Complete Guide](https://r-statistics.co/Outlier-Treatment-With-R.html) - [Variable Selection and Importance in R - Complete Guide](https://r-statistics.co/Variable-Selection-and-Importance-With-R.html) - [Model Selection in R - AIC, BIC, and Stepwise Methods](https://r-statistics.co/Model-Selection-in-R.html) - [Multidimensional Scaling in R - MDS Tutorial with Code](https://r-statistics.co/Multi-Dimensional-Scaling-With-R.html) - [InformationValue R Package - Variable Selection Guide](https://r-statistics.co/Information-Value-With-R.html) ### Time Series (3 tutorials) - [Time Series Analysis in R - A Complete Beginner's Guide](https://r-statistics.co/Time-Series-Analysis-With-R.html) - [Time Series Forecasting in R - Methods and Code Examples](https://r-statistics.co/Time-Series-Forecasting-With-R.html) - [Advanced Time Series Forecasting in R - ARIMA and Beyond](https://r-statistics.co/Time-Series-Forecasting-With-R-part2.html) ### Performance & Computing (3 tutorials) - [Parallel Computing in R - Speed Up Your Code with Examples](https://r-statistics.co/Parallel-Computing-With-R.html) - [Speed Up R Code - Proven Strategies and Optimization Tips](https://r-statistics.co/Strategies-To-Improve-And-Speedup-R-Code.html) - [Optimization in R - Methods and Practical Examples](https://r-statistics.co/Optimization-With-R.html) ## Statistical Tools (27 interactive calculators & interpreters) Free, browser-based statistical calculators with reproducible R code. Each tool runs entirely client-side, shows its formula, and produces a plain-language inference banner explaining what the result means. ### Calculators (8 tools) - [A/B Test Calculator](https://r-statistics.co/tools/ab-test-calculator.html) — Plan and analyze A/B tests: two-proportion z-test, Bayesian beta-binomial, sequential sanity check. Sample size, lift, CI, p, BF10. Reproducible R code, runs in your browser. - [Chi-Square Test Calculator](https://r-statistics.co/tools/chi-square-calculator.html) — Run a chi-square test of independence, goodness-of-fit, or homogeneity. Standardized residuals, Cramer's V, mosaic plot, Fisher's exact handoff, and reproducible R code. - [Confidence Interval Calculator](https://r-statistics.co/tools/confidence-interval-calculator.html) — Compute a confidence interval for a mean, proportion, difference, regression coefficient, Poisson rate, variance, or correlation. Includes Wilson, Clopper-Pearson, Newcombe, Welch, exact methods. Reproducible R code, runs in your browser. - [t-Test Calculator](https://r-statistics.co/tools/t-test-calculator.html) — One-sample, two-sample (Welch + pooled), and paired t-tests. Raw data or summary stats. t / df / p / 95% CI / Cohen's d / verdict, with reproducible R. Runs in your browser. - [Multiple Testing Correction Calculator](https://r-statistics.co/tools/multiple-testing-correction.html) — Adjust p-values for multiple comparisons: Bonferroni, Holm, Benjamini-Hochberg FDR, Benjamini-Yekutieli. Paste your p-values, see what's still significant, copy reproducible R. Runs in your browser. - [Equivalence / Non-Inferiority Calculator](https://r-statistics.co/tools/equivalence-noninferiority-calculator.html) — Plan and analyze equivalence and non-inferiority trials. Two one-sided tests (TOST), 90% CI vs equivalence bounds, sample size, with reproducible R code that runs in your browser. - [Bootstrap CI Calculator](https://r-statistics.co/tools/bootstrap-ci-calculator.html) — Run percentile, basic, and BCa bootstrap confidence intervals for the mean, median, SD, IQR, quantile, or any custom statistic. Paste raw data and the calculator does the resamples in your browser. Reproducible R code via boot::boot(). - [Z-Score & Percentile Calculator](https://r-statistics.co/tools/z-score-percentile.html) — Convert raw scores to z-scores, z to percentile, percentile to z, area between two z, and one or two-tailed tail probabilities. Reproducible R code, runs in your browser. ### Bayesian (2 tools) - [Bayes Factor Calculator](https://r-statistics.co/tools/bayes-factor-calculator.html) — Compute JZS Bayes factors (BF10 / BF01) for two-sample t, one-sample t, proportion, and correlation tests. Cauchy prior with sensitivity plot, posterior P(H1), and reproducible R via the BayesFactor package. - [Bayes Theorem Calculator](https://r-statistics.co/tools/bayes-theorem-calculator.html) — Update P(H|D) from prior, sensitivity, specificity. Step-by-step derivation, PPV/NPV, false-positive paradox, spam classifier, two-test chaining. Reproducible R, runs in your browser. ### R Output Interpreters (6 tools) - [lm() Output Interpreter](https://r-statistics.co/tools/lm-output-interpreter.html) — Paste R summary(lm(...)) output. Plain-English read of every coefficient, R^2 / F / residual interpretation, diagnostic callouts. Compare 2+ models with AIC / BIC / anova. Reproducible R code. - [glm() Output Interpreter](https://r-statistics.co/tools/glm-output-interpreter.html) — Paste R summary(glm(...)). Plain-English read of coefficients with odds-ratio / rate-ratio conversion. Logistic, Poisson, quasi-binomial, quasi-Poisson, Gamma. Compare 2+ models with deviance / AIC / LRT. Reproducible R. - [ANOVA Output Interpreter](https://r-statistics.co/tools/anova-output-interpreter.html) — Paste R aov() or car::Anova() output. Plain-English read of every effect, eta-squared and partial eta-squared, Type I vs II vs III explanation, and reproducible R code. - [Diagnostic Plot Interpreter](https://r-statistics.co/tools/diagnostic-plot.html) — Paste residuals + fitted values from your R lm() / glm() fit. Get verdicts on heteroscedasticity, nonlinearity, normality, outliers, and influence; mini plot.lm() previews; reproducible R code. - [VIF / Multicollinearity Interpreter](https://r-statistics.co/tools/vif-interpreter.html) — Paste car::vif() output or a correlation matrix; get traffic-light VIF flags, tolerance, condition number, GVIF support for factors, plain-English read of every problem predictor. Reproducible R code, runs in your browser. - [Confusion Matrix Interpreter](https://r-statistics.co/tools/confusion-matrix-interpreter.html) — Paste a confusion matrix; get accuracy, precision, recall, F1, MCC, kappa, balanced accuracy. Plain English read of which metric to trust when, with reproducible R. ### Pickers & Decision Tools (3 tools) - [Normality Test Picker](https://r-statistics.co/tools/normality-test-picker.html) — Test whether your data follows a normal distribution: Shapiro-Wilk, Anderson-Darling, Lilliefors, Jarque-Bera. Q-Q plot. Reproducible R code. Runs in your browser. - [Non-Parametric Test Picker](https://r-statistics.co/tools/nonparametric.html) — Pick the right rank-based test (Mann-Whitney U, Wilcoxon signed-rank, Kruskal-Wallis, Sign test) and run it on raw data. Test statistic, p-value, effect size, and Hodges-Lehmann CI in your browser, with reproducible R. - [DAG Confounder Picker](https://r-statistics.co/tools/dag-confounder-picker.html) — Draw a causal DAG; the picker identifies the minimum sufficient adjustment set via Pearl's back-door criterion, flags colliders, and emits dagitty R code. ### Study Design & Power (4 tools) - [Power Analysis Calculator](https://r-statistics.co/tools/power-analysis.html) — Solve for sample size, power, effect size, or alpha across t-tests, ANOVA, proportions, correlation, and chi-square. Cohen's benchmarks. Reproducible R code. Runs in your browser. - [Survival Analysis Power Calculator](https://r-statistics.co/tools/survival-power-calculator.html) — Plan a time-to-event clinical trial. Compute required events, sample size, or power for a log-rank test using Schoenfeld, Lakatos, or Freedman formulas with accrual, follow-up, and dropout. - [Effect Size Converter](https://r-statistics.co/tools/effect-size-converter.html) — Convert between effect sizes: Cohen's d, Hedges' g, Pearson's r, odds ratio, η², Cohen's f, NNT, CLES. With CIs and reproducible R code. Runs in your browser. - [Type I / II Error Visualizer](https://r-statistics.co/tools/type-i-ii-error-visualizer.html) — Visualize Type I and Type II errors with live overlapping sampling distributions. Drag effect, n, alpha; watch beta shrink and power rise. Six test types. Reproducible R code, runs in your browser. ### Specialized (4 tools) - [Time Series Stationarity & Order Picker](https://r-statistics.co/tools/ts-stationarity-calculator.html) — Run ADF and KPSS stationarity tests, suggest differencing order, and rank ARIMA(p,d,q) candidates by AICc. Paste a 1-D series, get a verdict, ACF/PACF plots, and reproducible R code. - [Outlier Detection Calculator](https://r-statistics.co/tools/outlier-detection-calculator.html) — Detect outliers in a numeric sample using Grubbs, Generalized ESD, Hampel (MAD), or Tukey IQR. Reproducible R code, runs in your browser. - [ROC / AUC Calculator](https://r-statistics.co/tools/roc-auc-calculator.html) — Paste outcomes + predicted scores; get ROC curve, AUC with DeLong 95% CI, optimal thresholds (Youden / F1 / cost-weighted), live confusion matrix, calibration. Reproducible R code. - [Reprex Builder](https://r-statistics.co/tools/reprex-builder.html) — Paste raw R code; get a clean, minimal, self-contained reproducible example. Lints for missing libraries, custom data without dput(), file reads, and seed gaps. Markdown-ready output.