This page lists every R tutorial on Statology.

**Import & Export Data****How to Manually Enter Raw Data in RHow to Save and Load RDA Files in RHow to Import CSV Files into RHow to Read a CSV from URL into RHow to Read Specific Rows from CSV File into RHow to Import & Merge Multiple CSV Files in RHow to Import CSV with Column Names that Contain Spaces in RHow to Download Files from the Internet Using RHow to Use readLines Function in RHow to Use the scan() Function in RHow to Read Zip Files into RHow to List Files by Date in RHow to Use list.files() in RHow to Use file.choose() in RHow to Use fread() in RHow to Use fwrite() in RHow to Open an .R File in RStudioHow to Import Excel Files into RHow to Import TSV Files into RHow to Import SAS Files into RHow to Import SPSS Files into RHow to Import .dta Files into RHow to Export List to a File in RHow to Export a Data Frame to CSV File in RHow to Export a Data Frame to Excel File in RHow to Export Data Frames to Multiple Excel Sheets in RHow to Export Multiple Plots to PDF in RHow to Use colClasses to Quickly Import Data in RHow to Use read.delim in RHow to Use write.table in RHow to Use write.xlsx in RHow to Use read.table in RHow to Use setwd / getwd in RHow to Create Directory if It Doesn’t Exist in RHow to Use the sink() Function in RHow to Use file.path() Function in RHow to Save R Output to Text FileHow to Check if File Exists in RHow to Rename Files in RHow to Delete a File in RHow to Move a File in RHow to Clear the Environment in RHow to Unload a Package in RHow to Use Stargazer Package in RHow to Check which Package Version is Loaded in RHow to Create a Multi-Line Comment in RThe Difference Between require() and library() in RHow to Load Multiple Packages in RHow to Check if a Package is Installed in RHow to Check if a Directory Exists in R**

**Descriptive Statistics****How to Calculate Descriptive Statistics in RA Complete Guide to the Built-in Datasets in RA Complete Guide to the Iris Dataset in RA Complete Guide to the mtcars Dataset in RA Complete Guide to the Boston Dataset in RA Complete Guide to the diamonds Dataset in RHow to Perform Data Cleaning in RHow to Create Summary Tables in RHow to Calculate Five Number Summary in RHow to Calculate Summary Statistics by Group in RHow to Use the describe() Function in RHow to Use describeBy() in RHow to Use the reduce() Function in RHow to Use the CrossTable() Function in RHow to Use the fill() Function in RHow to Use the unnest() Function in RHow to Use the fct_relevel() Function in RHow to Use approxfun() Function in RHow to Use the stat_poly_eq() Function in RHow to Use the box() Function in RHow to Use the ave() Function in RHow to Use the all.equal() Function in RHow to Use the exp() Function in RHow to Use the copy() Function in RHow to Use the choose() Function in RHow to Use the discretize() Function in RHow to Use the tail() Function in RHow to Use clean_names() Function in RHow to Use the dimnames() Function in RHow to Calculate Correlation By Group in RHow to Calculate Percentage by Group in RHow to Perform Exploratory Data Analysis in RHow to Calculate Ratios in RHow to Turn Off Scientific Notation in RHow to Calculate Z-Scores in RHow to Use the textxy() Function in RHow to Use xaxp() to Change Tick Mark Spacing in RHow to Use the plotMP() Function in RHow to Use corrplot in RHow to Change Font Size in corrplot in RHow to Use rcorr in RHow to Calculate Polychoric Correlation in RHow to Calculate Partial Correlation in RHow to Calculate Point-Biserial Correlation in RHow to Calculate Cross Correlation in RHow to Calculate Spearman Rank Correlation in RHow to Calculate Matthews Correlation Coefficient in RHow to Calculate Intraclass Correlation Coefficient in RHow to Find the P-value of Correlation Coefficient in RHow to Calculate Correlation Between Multiple Variables in RHow to Calculate Correlation in R with Missing ValuesHow to Create a Correlation Matrix in RHow to Create a Covariance Matrix in RHow to Calculate Inverse Matrix in RHow to Use the diag() Function in RHow to Calculate Determinant of Matrix in RHow to Calculate Variance in RHow to Find Outliers in RHow to Remove Outliers in RHow to Perform a Bonferroni Outlier Test in RHow to Calculate the Standard Error of the Mean in RHow to Use the summarize() Function in RHow to Calculate a Trimmed Mean in RHow to Calculate Conditional Mean in RHow to Use the std.error() Function in RHow to Calculate the Median Value of Rows in RHow to Calculate a Cumulative Average in RHow to Calculate a Bootstrap Standard Error in RHow to Perform Data Binning in RHow to Calculate Cohen’s d in RHow to Calculate Cohen’s Kappa in RHow to Select Unique Rows in a Data Frame in RHow to Select All But One Column in RHow to Find Unique Values in a Column in RHow to Find Unique Values and Sort Them in RHow to Find Unique Rows Across Multiple Columns in RHow to Add Multiple Columns to Data Frame in RHow to Perform a COUNTIF Function in RHow to Perform a SUMIF Function in RHow to Print String and Variable on Same Line in RHow to Use paste & paste0 Functions in RThe Difference Between cat() and paste() in RHow to Use do.call in RHow to Use set.seed in RHow to Use expand.grid() Function in RHow to Use the coeftest() Function in RHow to Use the confint() Function in RHow to Use the linearHypothesis() Function in RHow to Use unlist() Function in RHow to Use length() Function in RHow to Use lines() Function in RHow to Use fitdistr() Function in RHow to Use the drop() Function in RHow to Use the intersect() Function in RHow to Use the identical() Function in RHow to Use the rmvnorm() Function in RHow to Use attach() Function in RHow to Use nchar() Function in RHow to Use dim() Function in RHow to Use str() Function in RHow to Use cor() Function in RHow to Use optim Function in RHow to Use the melt() Function in RHow to Use the cast() Function in RHow to Use the get() Function in RHow to Use the cat() Function in RHow to Use strsplit() Function in RHow to Use substring() Function in RHow to Use the c() Function in RHow to Use text() Function in RHow to Use sign() Function in RHow to Use mtext() Function in RHow to Use the assign() Function in RHow to Use sprintf Function in RHow to Use the source Function in RHow to Use match Function in RHow to Use split Function in RHow to Split Column by Number of Characters in RHow to Use tabulate Function in RHow to Use the scale Function in RHow to Unscale Values in RHow to Winsorize Data in RHow to Use the View Function in RHow to Use table Function in RHow to Use the duplicated Function in RHow to Use sum Function in RHow to Use par Function in RHow to Use the margin.table() Function in RHow to Use microbenchmark() in RHow to Use Sys.time() to Time Code in RHow to Use prop.table Function in RHow to Use aggregate Function in RHow to Use aggregate & Not Drop Rows with NA in RHow to Use nrow Function in RHow to Use ncol Function in RHow to Find the Size of a Data Frame in RHow to Use the gsub Function in RHow to Use the sub Function in RHow to Use the summary Function in RHow to Use colMax Function in RHow to Use colMeans Function in RHow to Use rowMeans Function in RHow to Use the multiplot() Function in RHow to Use pmax & pmin Functions in R How to Average Across Columns in RHow to Sum Specific Columns in RHow to Sum Columns Based on a Condition in RHow to Calculate the Mean of a Column in RHow to Calculate the Mean of Multiple Columns in RHow to Calculate Standard Deviation by Group in RHow to Calculate the Mean by Group in RHow to Calculate the Sum by Group in RHow to Calculate Mean in RHow to Calculate Mode in RHow to Calculate Mode by Group in RHow to Calculate a Weighted Mean in RHow to Calculate Geometric Mean in RHow to Calculate Cumulative Sums in RHow to Calculate Cumulative Sum by Group in RHow to Calculate Expected Value in RHow to Convert Values in Column to Row Names in RHow to Use seq Function in RHow to Use dist Function in RHow to Use diff Function in RHow to Use with() and within() Functions in RHow to Calculate Conditional Probability in RHow to Apply Bayes’ Theorem in RHow to Calculate the Dot Product in RHow to Calculate a Cross Product in RHow to Calculate Cosine Similarity in RHow to Calculate Bray-Curtis Dissimilarity in RHow to Calculate Euclidean Norm of a Vector in RHow to Calculate Euclidean Distance in RHow to Calculate Hamming Distance in RHow to Calculate Levenshtein Distance in RHow to Calculate Manhattan Distance in RHow to Calculate Minkowski Distance in RHow to Calculate Mahalanobis Distance in RHow to Calculate Jaccard Similarity in RHow to Calculate Combinations & Permutations in RHow to Find Unique Combinations of Two Vectors in RHow to Calculate Autocorrelation in RHow to Calculate Rolling Correlation in RHow to Use Equivalent of SAS PROC FREQ in RHow to Create Frequency Tables in RHow to Create a Frequency Table of Multiple Variables in RHow to Create Relative Frequency Tables in RHow to Create a Two Way Table in RHow to Create a Three Way Table in RHow to Sort a Table in RHow to Use the mtable() Function in RHow to Use the stat.desc() Function in RHow to Find the Range in RHow to Calculate Interquartile Range in RHow to Use Min and Max Functions in RHow to Calculate Skewness & Kurtosis in RHow to Use the quantile() Function in RHow to Calculate Quartiles in RHow to Calculate Deciles in RHow to Calculate Percentiles in RHow to Calculate Quantiles by Group in RHow to Calculate Percentile Rank in RHow to Convert Between Z-Scores and Percentiles in RHow to Perform Bootstrapping in RHow to Calculate Point Estimates in RHow to Find Confidence Intervals in RHow to Calculate a Binomial Confidence Interval in RHow to Calculate Confidence Interval for Regression Coefficient in RHow to Calculate Standardized Regression Coefficients in RHow to Check Linear Regression Assumptions in RHow to Create a Contingency Table in RHow to Aggregate Multiple Columns in RHow to Create Pivot Tables in RHow to Use pivot_longer() on All Columns in RHow to Use pivot_wider() with Multiple Columns in RHow to Reshape Data Between Wide and Long Format in RHow to Count TRUE Values in Logical Vector in RHow to Count Number of Occurrences in Columns in RHow to Count Number of Rows in RHow to Count Number of Elements in List in RHow to Count Unique Values by Group in RHow to Count Unique Values in Column in RHow to Count Values in Column with Condition in RHow to Group By and Count with Condition in RHow to Group by Multiple Columns in RHow to Add a Count Column to a Data Frame in RHow to Perform Matrix Multiplication in RHow to Create the Identity Matrix in RHow to Use the repmat() Function in RHow to Perform Element-Wise Multiplication in RHow to Perform Univariate Analysis in RHow to Perform Bivariate Analysis in RHow to Calculate Cronbach’s Alpha in RHow to Calculate AUC (Area Under Curve) in RHow to Calculate F1 Score in RHow to Find the Antilog of Values in RHow to Solve a System of Equations in RHow to Plot an Equation in RHow to Perform Linear Interpolation in R**

**Visualizations**

**How to Plot Multiple Boxplots in One Chart in R**

How to Plot Boxplots with Mean Values in R

How to Change Axis Labels of Boxplot in R

How to Create Violin Plots in R

How to Add Titles to Plots in Base R

How to Create a Strip Chart in R

How to Create an Ogive Graph in R

How to Create a Proportional Venn Diagram in R

How to Plot Distribution of Column Values in R

How to Plot Multiple Lines in One Chart in R

How to Plot Multiple Histograms in R

How to Add Vertical Line to Histogram in R

How to Plot Categorical Data in R

How to Create a Correlation Heatmap in R

How to Use pheatmap() to Create Heatmaps in R

How to Create a Lollipop Chart in R

How to Create Kernel Density Plots in R

How to Create a Frequency Polygon in R

How to Use the Jitter Function in R for Scatterplots

How to Create a Biplot in R

How to Plot a Function Curve in R

How to Plot Two Functions in R

How to Label Points on a Scatterplot in R

How to Use alpha() to Change Transparency in Plots in R

How to Create a Scatterplot Matrix in R

How to Plot a Table in R

How to Plot a Subset of a Data Frame in R

How to Create a Population Pyramid in R

How to Plot SVM Object in R

How to Create 3D Plots in R

How to Use abline() in R

How to Add Label to abline in R

How to Plot Multiple Plots on Same Graph in R

How to Create a Histogram with Different Colors in R

How to Create a Relative Frequency Histogram in R

How to Create a Histogram of Two Variables in R

How to Change Number of Bins in Histogram in R

How to Specify Histogram Breaks in R

How to Display Percentages on Histogram in R

How to Create Scatter Plots by Group in R

How to Create a Scatterplot with a Regression Line in R

How to Use stat_regline_equation() in R

How to Create a Scatterplot in R with Multiple Variables

How to Predict Values in R Using Multiple Regression Model

How to Perform Linear Regression with Categorical Variables in R

How to Perform t-Test for Slope of Regression Line in R

How to Plot Predicted Values in R

How to Plot Line of Best Fit in R

How to Plot a Decision Tree in R

How to Create and Interpret Pairs Plots in R

How to Plot a Confidence Interval in R

How to Plot Multiple Columns in R

How to Overlay Plots in R

How to Overlay Normal Curve on Histogram in R

How to Reorder Boxplots in R

How to Remove Outliers in Boxplots in R

How to Create Horizontal Boxplots in R

How to Create Radar Charts in R

How to Create a Stacked Barplot in R

How to Create a Grouped Barplot in R

How to Change X-Axis Labels of Barplot in R

How to Break the Axis of Plots in R

How to Create a Stacked Dot Plot in R

How to Create Added Variable Plots in R

How to Draw a Legend Outside of a Plot in R

How to Change Legend Size in Base R Plot

How to Add Text Outside of a Plot in R

How to Use cex to Change the Size of Plot Elements in R

How to Use bty Option to Change Chart Box Styles in R

How to Draw Circles in Plots in R

How to Use the polygon() Function in R

How to Change Legend Position in Base R Plots

How to Create a Horizontal Legend in Base R

How to Create an Interaction Plot in R

How to Create a Pareto Chart in R

How to Create a Bubble Chart in R

How to Create a Scree Plot in R

How to Create a Bland-Altman Plot in R

How to Plot a Logistic Regression Curve in R

How to Create a Forest Plot in R

How to Create a Log-Log Plot in R

How to Change Axis Scales in R Plots

How to Use scale_x_date to Format Dates in R

How to Use scale_x_discrete in R

How to Use the tsplot() Function in R

How to Use stat_smooth() Function in R

How to Change Axis Intervals in R Plots

How to Add Error Bars to Charts in R

How to Use xlim() and ylim() in R

Curve Fitting in R

How to Use Italic Font in R

How to Use Bold Font in R

How to Change Font Size in Base R Plots

How to Plot Boxplots with Mean Values in R

How to Change Axis Labels of Boxplot in R

How to Create Violin Plots in R

How to Add Titles to Plots in Base R

How to Create a Strip Chart in R

How to Create an Ogive Graph in R

How to Create a Proportional Venn Diagram in R

How to Plot Distribution of Column Values in R

How to Plot Multiple Lines in One Chart in R

How to Plot Multiple Histograms in R

How to Add Vertical Line to Histogram in R

How to Plot Categorical Data in R

How to Create a Correlation Heatmap in R

How to Use pheatmap() to Create Heatmaps in R

How to Create a Lollipop Chart in R

How to Create Kernel Density Plots in R

How to Create a Frequency Polygon in R

How to Use the Jitter Function in R for Scatterplots

How to Create a Biplot in R

How to Plot a Function Curve in R

How to Plot Two Functions in R

How to Label Points on a Scatterplot in R

How to Use alpha() to Change Transparency in Plots in R

How to Create a Scatterplot Matrix in R

How to Plot a Table in R

How to Plot a Subset of a Data Frame in R

How to Create a Population Pyramid in R

How to Plot SVM Object in R

How to Create 3D Plots in R

How to Use abline() in R

How to Add Label to abline in R

How to Plot Multiple Plots on Same Graph in R

How to Create a Histogram with Different Colors in R

How to Create a Relative Frequency Histogram in R

How to Create a Histogram of Two Variables in R

How to Change Number of Bins in Histogram in R

How to Specify Histogram Breaks in R

How to Display Percentages on Histogram in R

How to Create Scatter Plots by Group in R

How to Create a Scatterplot with a Regression Line in R

How to Use stat_regline_equation() in R

How to Create a Scatterplot in R with Multiple Variables

How to Predict Values in R Using Multiple Regression Model

How to Perform Linear Regression with Categorical Variables in R

How to Perform t-Test for Slope of Regression Line in R

How to Plot Predicted Values in R

How to Plot Line of Best Fit in R

How to Plot a Decision Tree in R

How to Create and Interpret Pairs Plots in R

How to Plot a Confidence Interval in R

How to Plot Multiple Columns in R

How to Overlay Plots in R

How to Overlay Normal Curve on Histogram in R

How to Reorder Boxplots in R

How to Remove Outliers in Boxplots in R

How to Create Horizontal Boxplots in R

How to Create Radar Charts in R

How to Create a Stacked Barplot in R

How to Create a Grouped Barplot in R

How to Change X-Axis Labels of Barplot in R

How to Break the Axis of Plots in R

How to Create a Stacked Dot Plot in R

How to Create Added Variable Plots in R

How to Draw a Legend Outside of a Plot in R

How to Change Legend Size in Base R Plot

How to Add Text Outside of a Plot in R

How to Use cex to Change the Size of Plot Elements in R

How to Use bty Option to Change Chart Box Styles in R

How to Draw Circles in Plots in R

How to Use the polygon() Function in R

How to Change Legend Position in Base R Plots

How to Create a Horizontal Legend in Base R

How to Create an Interaction Plot in R

How to Create a Pareto Chart in R

How to Create a Bubble Chart in R

How to Create a Scree Plot in R

How to Create a Bland-Altman Plot in R

How to Plot a Logistic Regression Curve in R

How to Create a Forest Plot in R

How to Create a Log-Log Plot in R

How to Change Axis Scales in R Plots

How to Use scale_x_date to Format Dates in R

How to Use scale_x_discrete in R

How to Use the tsplot() Function in R

How to Use stat_smooth() Function in R

How to Change Axis Intervals in R Plots

How to Add Error Bars to Charts in R

How to Use xlim() and ylim() in R

Curve Fitting in R

How to Use Italic Font in R

How to Use Bold Font in R

How to Change Font Size in Base R Plots

**Probability Distributions****How to Use the Uniform Distribution in RHow to Use the Multinomial Distribution in RHow to Use the Triangular Distribution in RHow to Calculate KL Divergence in RHow to Fit a Gamma Distribution to a Dataset in RNormal Distribution in R: dnorm, pnorm, rnorm, qnormBinomial Distribution in R: dbinom, pbinom, qbinom, rbinomPoisson Distribution in R: dpois, ppois, qpois, rpoisChi-Square Distribution in R: dchisq, pchisq, qchisq, and rchisqGeometric Distribution in R: dgeom, pgeom, qgeom, rgeomGamma Distribution in R: dgamma, pgamma, qgamma, rgammaThe t Distribution in R: dt, qt, pt, rtThe Difference Between rnorm() and runif() in RHow to Interpret Chi-Square Test Results in RHow to Use the HSD.test Function in RHow to Calculate & Plot a CDF in RHow to Calculate Sampling Distributions in RHow to Apply the Empirical Rule in RHow to Apply the Central Limit Theorem in RHow to Use the Normal CDF in RHow to Use ecdf() Function in RHow to Use the Bernoulli Distribution in RHow to Simulate & Plot a Bivariate Normal Distribution in RHow to Plot a Normal Distribution in RHow to Plot a Chi-Square Distribution in RHow to Plot a t Distribution in RHow to Plot a Log Normal Distribution in RHow to Plot an Exponential Distribution in RHow to Plot a Binomial Distribution in RHow to Plot a Poisson Distribution in RHow to Plot a Weibull Distribution in RHow to Plot a Beta Distribution in RHow to Plot a Uniform Distribution in RHow to Calculate the P-Value of an F-Statistic in RHow to Calculate the P-Value of a Chi-Square Statistic in RHow to Calculate the P-Value of a T-Score in RHow to Calculate the P-Value of a Z-Score in RHow to Find the F Critical Value in RHow to Find the Chi-Square Critical Value in RHow to Find t Critical Values in RHow to Find Z Critical Values in R**

**Sampling Methods****Stratified Sampling in RCluster Sampling in RSystematic Sampling in R**

**Hypothesis Tests****The Complete Guide: Hypothesis Testing in RHow to Conduct a Sobel Test in RHow to Perform a One Proportion Z-Test in RHow to Perform One Sample & Two Sample Z-Tests in RHow to Conduct Fisher’s Exact Test in RHow to Conduct a Jarque-Bera Test in RHow to Conduct an Anderson-Darling Test in RHow to Perform a Wald Test in RHow to Perform a KPSS Test in RHow to Perform a Kruskal-Wallis Test in RHow to Perform a Variance Ratio Test in RA Guide to Bartlett’s Test of SphericityHow to Calculate Standard Deviation in RHow to Calculate Pooled Standard Deviation in RHow to Calculate Weighted Standard Deviation in RHow to Calculate Standard Deviation of Data Frame Columns in RHow to Calculate Standard Deviation of Data Frame Rows in RHow to Calculate the Coefficient of Variation in RHow to Identify Influential Data Points Using Cook’s DistanceHow to Conduct Levene’s Test for Equality of Variances in RHow to Perform an F-Test in RHow to Create & Interpret a Q-Q Plot in RHow to Perform a One Sample t-test in RHow to Perform a Two Sample t-test in RHow to Perform a Paired t-test in RHow to Perform Welch’s t-test in RHow to Perform the Wilcoxon Signed-Rank Test in RHow to Calculate Pooled Variance in RHow to Perform a Mann-Whitney U Test in RHow to Perform a Mann-Kendall Trend Test in RHow to Perform McNemar’s Test in RHow to Perform Grubbs’ Test in RHow to Perform a Binomial Test in RHow to Perform Mood’s Median Test in RHow to Perform Runs Test in RHow to Test for Normality in RHow to Perform Multivariate Normality Tests in RHow to Perform a Shapiro-Wilk Test in RHow to Perform a Kolmogorov-Smirnov Test in RHow to Perform a Cramer-Von Mises Test in RHow to Perform a Correlation Test in RHow to Perform a Chi-Square Test of Independence in RHow to Perform a Chi-Square Goodness of Fit Test in RHow to Perform a Likelihood Ratio Test in RHow to Calculate Cramer’s V in RHow to Calculate a Phi Coefficient in RHow to Calculate Gini Coefficient in RHow to Perform a Chow Test in RHow to Perform a Granger-Causality Test in RHow to Perform Bartlett’s Test in RHow to Perform a Log Rank Test in R**

**Regression****How to Perform Cross Validation for Model Performance in RHow to Create a Prediction Interval for Linear Regression in RHow to Predict a Single Value Using a Regression Model in RHow to Perform Multiple Linear Regression in RHow to Perform Quadratic Regression in RHow to Perform Exponential Regression in RHow to Perform Logarithmic Regression in RHow to Perform LOESS Regression in RHow to Perform Power Regression in RHow to Perform Robust Regression in RHow to Perform Quantile Regression in RHow to Perform Spline Regression in RHow to Perform Polynomial Regression in RHow to Plot a Polynomial Regression Curve in RHow to Perform Stepwise Regression in RHow to Perform Piecewise Regression in RHow to Perform Weighted Least Squares Regression in RHow to Interpret Regression Output in RHow to Interpret Pr(>|t|) in Regression Output in RHow to Interpret Pr(>|z|) in Logistic Regression Output in RHow to Calculate Odds Ratios in Logistic Regression Model in RHow to Calculate Variance Inflation Factor (VIF) in RHow to Use Method of Least Squares in RHow to Use trainControl() to Control Training Parameters in RHow to Perform Poisson Regression in RHow to Extract Regression Coefficients from glm in RHow to Use the predict Function with glm in RHow to Use the predict Function with lm in RHow to Use the predict Function with Logistic Regression in RThe Difference Between glm and lm in RHow to Interpret glm Output in RHow to Use the findCorrelation() Function in RHow to Use lm() Function in R to Fit Linear ModelsHow to Extract P-Values from lm() Function in RHow to Extract Coefficients from lm() Function in RHow to Extract R-Squared from lm() Function in RHow to Extract Residuals from lm() Function in RHow to Extract Standard Errors from lm() Function in RHow to Extract RMSE from lm() Function in RHow to Use Subset of Data Frame with lm() Function in RHow to Extract Fitted Values in RHow to Use regsubsets() in R for Model SelectionHow to Perform a Durbin-Watson Test in RHow to Perform a Breusch-Godfrey Test in RHow to Perform a Breusch-Pagan Test in RHow to Perform White’s Test in RHow to Perform the Goldfeld-Quandt Test in RHow to Create a Residual Plot in RHow to Create Partial Residual Plots in RHow to Calculate Residual Standard Error in RHow to Calculate Robust Standard Errors in RHow to Test for Multicollinearity in RHow to Perform a Box-Cox Transformation in RHow to Calculate R-Squared for glm in RHow to Calculate Coefficient of Determination (R-Squared) in RHow to Calculate Adjusted R-Squared in RHow to Calculate BIC in R**

**How to Interpret a Scale-Location Plot in R**

How to Interpret Diagnostic Plots in R

How to Calculate Studentized Residuals in R

How to Calculate Standardized Residuals in R

How to Calculate Leverage Statistics in R

How to Calculate DFFITS in R

How to Calculate DFBETAS in R

How to Calculate Mallows’ Cp in R

How to Calculate AIC in R

How to Use stepAIC in R for Feature Selection

How to Plot lm() Results in R

How to Plot Multiple Linear Regression Results in R

How to Calculate Residual Sum of Squares in R

How to Create a Histogram of Residuals in R

How to Create Dummy Variables in R

How to Add a Regression Equation to a Plot in R

How to Perform OLS Regression in R

How to Perform a Lack of Fit Test in R

How to Calculate SST, SSR, and SSE in R

How to Create a Confusion Matrix in R

How to Use the Elbow Method in R

How to Interpret Diagnostic Plots in R

How to Calculate Studentized Residuals in R

How to Calculate Standardized Residuals in R

How to Calculate Leverage Statistics in R

How to Calculate DFFITS in R

How to Calculate DFBETAS in R

How to Calculate Mallows’ Cp in R

How to Calculate AIC in R

How to Use stepAIC in R for Feature Selection

How to Plot lm() Results in R

How to Plot Multiple Linear Regression Results in R

How to Calculate Residual Sum of Squares in R

How to Create a Histogram of Residuals in R

How to Create Dummy Variables in R

How to Add a Regression Equation to a Plot in R

How to Perform OLS Regression in R

How to Perform a Lack of Fit Test in R

How to Calculate SST, SSR, and SSE in R

How to Create a Confusion Matrix in R

How to Use the Elbow Method in R

**ANOVA****How to Conduct a One-Way ANOVA in RHow to Conduct a Two-Way ANOVA in RHow to Conduct a Three-Way ANOVA in RHow to Conduct a Repeated Measures ANOVA in RHow to Conduct a Nested ANOVA in RHow to Conduct a MANOVA in RHow to Conduct an ANCOVA in RHow to Perform Welch’s ANOVA in RHow to Perform the Friedman Test in RHow to Perform Tukey’s Test in RHow to Perform a Brown–Forsythe Test in RHow to Perform a Bonferroni Correction in RHow to Perform Scheffe’s Test in RHow to Perform Dunnett’s Test in RHow to Perform Dunn’s Test in RHow to Perform Fisher’s LSD Test in RHow to Perform Post-Hoc Pairwise Comparisons in RHow to Calculate Eta Squared in RHow to Create an Interaction Plot in RWhen to Use aov() vs. anova() in R**

**Time Series****How to Calculate MAPE in RHow to Calculate SMAPE in RHow to Calculate WMAPE in RHow to Calculate RMSE in RHow to Calculate MSE in RHow to Calculate MAD in RHow to Calculate MAE in RHow to Fit a TBATS Model in RHow to Create a Time Series in RHow to Plot a Time Series in RHow to Use the forecast() Function in RHow to Convert Data Frame to Time Series in RHow to Perform Naive Forecasting in RHow to Perform Lowess Smoothing in RHow to Calculate a Rolling Average in RHow to Calculate a Moving Average by Group in RHow to Calculate an Exponential Moving Average in RHow to Aggregate Daily Data to Monthly and Yearly in RHow to Calculate Number of Months Between Dates in RHow to Fill in Missing Dates in RHow to Combine Date and Time in RHow to Find Earliest Date in a Column in RHow to Extract Month from Date in RHow to Add and Subtract Months from a Date in RHow to Use yearmon() in RHow to Subtract Hours from Time in RHow to Add Days to Date in RHow to Calculate Business Days in RHow to Extract Year from Date in RHow to Convert Excel Date Format to Proper Date in RHow to Get Week Number from Dates in RHow to Check if Date is Between Two Dates in RHow to Check if Column is Date in RHow to Find Day of the Week in RHow to Group Data by Week in RHow to Group Data by Month in RHow to Group Data by Year in RHow to Group Data by Hour in RHow to Convert Date to Quarter and Year in RHow to Subset by a Date Range in RHow to Use Date Formats in RHow to Use as.Date() Function in RHow to Perform an Augmented Dickey-Fuller Test in RHow to Use the year() Function in RHow to Get First or Last Day of Month Using Lubridate in RHow to Convert Character to Date Using Lubridate in RHow to Generate a Sequence of Dates Using lubridate in RHow to Use lubridate to Get and Set Current Year in RHow to Calculate Age Using lubridate in RHow to Use lubridate to Extract Time from Datetime in RHow to Use lubridate to Calculate Difference Between Dates in R**

**R Operations****A Guide to apply(), lapply(), sapply(), and tapply() in RHow to Add an Index (numeric ID) Column to a Data Frame in RHow to Add Superscripts & Subscripts to Plots in RHow to Check Data Type in RDifference Between data.table vs. data frame in RHow to Filter a data.table in RHow to Use dcast Function from data.table in RHow to Sort a data.table in RHow to Add Row to data.table in RHow to Group data.table by Multiple Columns in RHow to Select Specific Columns of data.table in RHow to Subset data.table Based on Multiple Conditions in RHow to Filter Rows where Column is Between Two Values in RHow to Use the setDT() Function in RHow to Set Data Frame Column as Index in RHow to Rename Data Frame Columns in RHow to Rename a Single Column in RHow to Rename Factor Levels in RHow to Add New Level to Factor in RHow to Use the relevel() Function in RHow to Subset Data Frame by Multiple Conditions in RHow to Subset Data Frame by Factor Levels in RHow to Subset Data Frame by List of Values in RHow to Perform Reverse Coding in RHow to Rename an Object in RHow to Use the names Function in RHow to Use make.names Function in RHow to Use setNames Function in RHow to Generate a Sample Using the Sample Function in RHow to Replicate Rows in Data Frame in RHow to Use the cut() Function in RHow to Use rep() Function in RHow to Use the replicate() Function in RHow to Use the replace() Function in RHow to Use the replace_na Function in RHow to Use the na.locf() Function in RHow to Use the sweep() Function in RHow to Use the tapply() Function in RHow to Use the map() Function in RHow to Use gsub() in RHow to Use strptime and strftime Functions in RHow to Use difftime() in RHow to Perform Quantile Normalization in RHow to Normalize Data in RHow to Standardize Data in RHow to Scale Values Between 0 and 1 in RHow to Perform Multidimensional Scaling in RHow to Use SMOTE for Imbalanced Data in RHow to Merge Data Frames Based on Multiple Columns in RHow to Merge Data Frames by Column Names in RHow to Merge Multiple Data Frames in RHow to Merge Data Frames by Row Names in RInterpreting Errors in R: ‘max’ not meaningful for factorsHow to Handle “undefined columns selected” in RHow to Remove Rows with Some or All NAs in RHow to Remove Multiple Rows in RHow to Select Rows by Index in RHow to Select Rows Where Value Appears in Any Column in RHow to Select Rows with NA Values in RHow to Select Rows by Condition in RHow to Select Rows in Data Frame Based on Values in Vector in RHow to Extract Last Row in Data Frame in RHow to Check if Row in One Data Frame Exists in Another in RHow to Select Top N Values by Group in RHow to Drop Columns from Data Frame in RHow to Drop Columns by Name in RHow to Drop Columns if Name Contains Specific String in RHow to Drop All Columns Except Specific Ones in RHow to Remove Columns with NA Values in RHow to Remove Last Column in RHow to Remove Columns with Same Value in RHow to Use strsplit() with Multiple Delimiters in RHow to Count Number of NA Values in Each Column in RHow to Select Specific Columns in RHow to Select Columns by Index in RHow to Collapse Text by Group in Data Frame in RHow to Check if Column Contains String in RHow to Use Wildcard Characters in RHow to Check if Column Exists in Data Frame in RHow to Check if Multiple Columns are Equal in RHow to Select Columns Containing a Specific String in RHow to Count Words in String in RHow to Use the gregexpr() Function in RHow to Remove Specific Elements from Vector in RHow to Filter a Vector in RHow to Check if a Vector Contains a Given Element in RHow to Split a Vector into Chunks in RHow to Split Number into Digits in RHow to Drop Rows that Contain a Specific String in RHow to Split Character String and Get First Element in RHow to Check if Character is in String in RHow to Extract Numbers from Strings in RHow to Add Leading Zeros to Numbers in RHow to Extract String Between Specific Characters in RHow to Extract String After Specific Character in RHow to Extract String Before Space in RHow to Extract Substring Starting from End of String in RHow to Check if String Contains Multiple Substrings in RHow to Convert Strings to Lowercase in RHow to Use the toupper() Function in RHow to Check if String Contains Specific Characters in RHow to Count Occurrences of Character in String in RHow to Concatenate Strings in RHow to Concatenate Vector of Strings in RHow to Concatenate Matrices in RHow to Use grepl() with Multiple Patterns in RComparing grep() vs. grepl() in RComparing lapply() vs. sapply() in RHow to Use sapply() Function with Multiple Arguments in RHow to Use grep() to Find Exact Match in RHow to Use grep() for Pattern Matching and Replacement in RHow to Use grep() with OR in RHow to Use Case-Insensitive grep() in RHow to Use grep() and Return Only Substring in RHow to Use grep() to Not Include Specific Matches in RHow to Use lapply() with Multiple Arguments in RHow to Print Tables in RHow to Print All Rows of a Tibble in RHow to Print Multiple Variables on the Same Line in RHow to Switch Two Columns in RHow to Remove Outliers from Multiple Columns in RHow to Stack Data Frame Columns in RHow to Split a Data Frame in RHow to Split Data into Equal Sized Groups in RHow to Combine Rows with Same Column Values in RHow to Combine Two Columns into One in RHow to Combine Two Data Frames in R with Different ColumnsHow to Add Suffix to Column Names in RHow to Add Prefix to Column Names in RHow to Loop Through Column Names in RHow to Get Column Names in RHow to Loop Through List in RHow to Iterate Over Rows of Data Frame in RHow to Create a List in RHow to Use “OR” Operator in RHow to Use the Pipe Operator in RHow to Use “NOT IN” Operator in RHow to Use Dollar Sign ($) Operator in RHow to Use the Tilde Operator (~) in RHow to Subset a Data Frame in RHow to Keep Certain Columns in RHow to Extract Specific Columns from Data Frame in RHow to Compare Two Vectors in RHow to Combine Two Vectors in RHow to Compare Two Columns in RHow to Compare Strings in RHow to Compare Three Columns in RHow to Delete Multiple Columns in RHow to Perform Listwise Deletion in RHow to Interpolate Missing Values in RHow to Replace Missing Values in RHow to Find and Count Missing Values in RHow to Count Non-NA Values in RHow to Impute Missing Values in RHow to Find Columns with All Missing Values in RHow to Find Column with Max Value for Each Row in RHow to Select Row with Max Value in Specific Column in RHow to Use drop_na in RHow to Use na.omit in RHow to Use na.rm in RHow to Use is.na in RHow to Use is.null in RHow to Remove NA Values from Vector in RHow to Remove NA from Matrix in RHow to Add New Column to Matrix in RHow to Use complete.cases in RHow to Use “Is Not NA” in RHow to Handle NaN Values in RHow to Transform Data in RHow to Perform Arcsine Transformation in RHow to Round Numbers in RHow to Transpose a Data Frame in RHow to Remove Rows with Any Zeros in RHow to Remove Empty Rows from Data Frame in RHow to Check if Data Frame is Empty in RHow to Create an Empty Data Frame in RHow to Create an Empty Matrix in RHow to Create an Empty List in RHow to Create an Empty Vector in RHow to Add an Empty Column to a Data Frame in RHow to Create an Empty Plot in RHow to Add Column If It Does Not Exist in RHow to Create New Data Frame from Existing Data Frame in RHow to Add Points to an Existing Plot in RHow to Clear All Plots in RHow to Extract Rows from Data Frame in RHow to Append Rows to a Data Frame in RHow to Insert Row into Data Frame in RHow to Remove Rows in RHow to Remove Rows with NA in One Column in RHow to Count Duplicates in RHow to Remove Duplicate Rows in RHow to Remove Duplicate Rows so None are Left in RHow to Append Values to a Vector Using a Loop in RHow to Append Values to List in RHow to Combine Lists in RHow to Combine a List of Matrices in RHow to Delete Data Frames in RHow to Perform a VLOOKUP (Similar to Excel) in RHow to Replace Values in Data Frame Based on Lookup Table in RHow to Remove Dollar Signs in RHow to Create Tables in RHow to Create Table and Include NA Values in RHow to Create a Nested For Loop in RHow to Create a For Loop with Range in RHow to Use the foreach() Function in RHow to Create a While Loop in RHow to Write a Repeat Loop in RHow to Apply a Function Over a Vector in RHow to Return Value from Function in RHow to Write a tryCatch() Function in RHow to Return Multiple Values from Function in RHow to Exit a Function in RHow to Catch integer(0) in RHow to Create a Vector of Zeros in RHow to Select Random Samples in RHow to Generate Random Numbers in RHow to Create a Vector with Random Numbers in RHow to Create a Matrix with Random Numbers in RHow to Create a Data Frame with Random Numbers in RHow to Create a Data Frame from Vectors in RHow to Use runif Function in RHow to Generate a Normal Distribution in RHow to Use xtabs() in R to Calculate FrequenciesHow to Calculate Difference Between Rows in RHow to Calculate Odds Ratios in RHow to Add a Total Row to a Data Frame in RHow to Retrieve Row Numbers in RHow to Reset Row Numbers of Data Frame in RHow to Apply Function to Each Row in RHow to Find the Max Value in Each Row in RHow to Find Closest Value in Vector in RHow to Use apply() Function on Specific Columns in RHow to Remove First Row from Data Frame in RHow to Find First Row that Meets Criteria in RHow to Select First N Rows of Data Frame in RHow to Conditionally Remove Rows in RHow to Use rowSums() Function in RHow to Use colSums() Function in RHow to Sort a Data Frame by Date in RHow to Sort Values Alphabetically in RHow to Sort by Multiple Columns in RHow to Sort Using row.names in RHow to Sort a Matrix in RHow to Sum Values in Matrix in RHow to Remove Columns from a Matrix in RHow to Remove Column Names in RHow to Multiply Matrix by Vector in RHow to Use sort(), order(), and rank() in RHow to Use ties.method in rank() Function in RHow to Create a List of Lists in RHow to Create a Named List in R**

**How to Subset Lists in R**

How to Use LETTERS in R

How to Find Location of Character in a String in R

How to Remove Characters from String in R

How to Remove Last Character from String in R

How to Remove Spaces from Strings in R

How to Remove Quotes from Strings in R

How to Retrieve Row Index Number in R

How to Find Index of Element in a Vector in R

How to Convert Vector to List in R

How to Convert List to Data Frame in R

How to Convert List to Vector in R

How to Convert List to Matrix in R

How to Convert Table to Matrix in R

How to Convert Table to Data Frame in R

How to Convert Tibble to Data Frame in R

How to Convert Data Frame Column to Vector in R

How to Convert Data Frame Column to List in R

How to Convert Data Frame to Matrix in R

How to Convert Matrix to Data Frame in R

How to Convert Matrix to Vector in R

How to Convert Character to Numeric in R

How to Convert Character to Factor in R

How to Convert Character to a Timestamp in R

How to Convert UNIX Timestamp to Date in R

How to Convert Factor to Character in R

How to Convert Factor to Date in R

How to Convert Factor to Numeric in R

How to Convert a Vector to String in R

How to Convert Strings to Dates in R

How to Convert String to Datetime in R

How to Convert Datetime to Date in R

How to Convert Numbers to Dates in R

How to Convert Date to Numeric in R

How to Convert Numeric to Character in R

How to Convert Numeric to Factor in R

How to Use as.numeric() Function in R

How to Convert TRUE and FALSE to 1 and 0 in R

How to Convert Categorical Variables to Numeric in R

How to Create Categorical Variable from Continuous in R

How to Perform Label Encoding in R

How to Create a Matrix from Vectors in R

How to Interpret Significance Codes in R

How to Change Row Names in R

How to Center Data in R

How to Scale Only Numeric Columns in R

How to Sum Specific Rows in R

The Difference Between ifelse() vs. if_else() in R

How to Prevent ifelse() from Converting Date to Numeric in R

How to Use which() Function with Multiple Conditions in R

How to Use If Statement with Multiple Conditions in R

How to Write a Nested If Else Statement in R

How to Include NA in ifelse Statement in R

How to Write a Case Statement in R

How to Use cbind in R

How to Use rbind in R

How to Use rbindlist in R

The Difference Between rbind and cbind in R

How to Rename Columns When Using cbind in R

How to Add a Column to a Data Frame in R

How to Add Column to Data Frame in R Based on Other Columns

How to Do a Left Join in R

How to Do a Right Join in R

How to Do an Inner Join in R

How to Do an Outer Join in R

How to Do a Cross Join in R

The Difference Between merge() vs. join() in R

How to Perform Fuzzy Matching in R

How to Use the Which Function in R

How to Use the Square Root Function in R

How to Calculate the Square of a Value in R

How to Calculate Log in R

How to Calculate Lagged Values in R

How to Sort a Data Frame by Column in R

How to Find the Max Value Across Multiple Columns in R

How to Use str_c in R

How to Use str_count in R

How to Use str_replace in R

How to Use str_remove in R

How to Use str_pad in R

How to Use str_trim in R

How to Use str_sub in R

How to Use str_match in R

How to Use str_split in R

How to Use str_extract_all() in R

How to Use str_replace_all in R

How to Use str_extract in R

How to Use str_detect in R

How to Use the trimws Function in R

How to Replace Values in a Matrix in R

How to Replace NAs with Strings in R

How to Replace Zero with NA in R

How to Replace Inf Values with NA in R

How to Replace Blanks with NA in R

How to Replace Values in Data Frame in R

How to Use mapvalues() Function in r

How to Replace Values in Data Frame Conditionally in R

How to Split Column Into Multiple Columns in R

How to Use setdiff in R

How to Use the droplevels Function in R

How to Reorder Factor Levels in R

Format Numbers as Percentages in R

Partial String Matching in R

How to Create Categorical Variables in R

How to Split Data into Training & Test Sets in R

How to Use createDataPartition() Function in R

How to Use sample.split() Function in R

How to Use LETTERS in R

How to Find Location of Character in a String in R

How to Remove Characters from String in R

How to Remove Last Character from String in R

How to Remove Spaces from Strings in R

How to Remove Quotes from Strings in R

How to Retrieve Row Index Number in R

How to Find Index of Element in a Vector in R

How to Convert Vector to List in R

How to Convert List to Data Frame in R

How to Convert List to Vector in R

How to Convert List to Matrix in R

How to Convert Table to Matrix in R

How to Convert Table to Data Frame in R

How to Convert Tibble to Data Frame in R

How to Convert Data Frame Column to Vector in R

How to Convert Data Frame Column to List in R

How to Convert Data Frame to Matrix in R

How to Convert Matrix to Data Frame in R

How to Convert Matrix to Vector in R

How to Convert Character to Numeric in R

How to Convert Character to Factor in R

How to Convert Character to a Timestamp in R

How to Convert UNIX Timestamp to Date in R

How to Convert Factor to Character in R

How to Convert Factor to Date in R

How to Convert Factor to Numeric in R

How to Convert a Vector to String in R

How to Convert Strings to Dates in R

How to Convert String to Datetime in R

How to Convert Datetime to Date in R

How to Convert Numbers to Dates in R

How to Convert Date to Numeric in R

How to Convert Numeric to Character in R

How to Convert Numeric to Factor in R

How to Use as.numeric() Function in R

How to Convert TRUE and FALSE to 1 and 0 in R

How to Convert Categorical Variables to Numeric in R

How to Create Categorical Variable from Continuous in R

How to Perform Label Encoding in R

How to Create a Matrix from Vectors in R

How to Interpret Significance Codes in R

How to Change Row Names in R

How to Center Data in R

How to Scale Only Numeric Columns in R

How to Sum Specific Rows in R

The Difference Between ifelse() vs. if_else() in R

How to Prevent ifelse() from Converting Date to Numeric in R

How to Use which() Function with Multiple Conditions in R

How to Use If Statement with Multiple Conditions in R

How to Write a Nested If Else Statement in R

How to Include NA in ifelse Statement in R

How to Write a Case Statement in R

How to Use cbind in R

How to Use rbind in R

How to Use rbindlist in R

The Difference Between rbind and cbind in R

How to Rename Columns When Using cbind in R

How to Add a Column to a Data Frame in R

How to Add Column to Data Frame in R Based on Other Columns

How to Do a Left Join in R

How to Do a Right Join in R

How to Do an Inner Join in R

How to Do an Outer Join in R

How to Do a Cross Join in R

The Difference Between merge() vs. join() in R

How to Perform Fuzzy Matching in R

How to Use the Which Function in R

How to Use the Square Root Function in R

How to Calculate the Square of a Value in R

How to Calculate Log in R

How to Calculate Lagged Values in R

How to Sort a Data Frame by Column in R

How to Find the Max Value Across Multiple Columns in R

How to Use str_c in R

How to Use str_count in R

How to Use str_replace in R

How to Use str_remove in R

How to Use str_pad in R

How to Use str_trim in R

How to Use str_sub in R

How to Use str_match in R

How to Use str_split in R

How to Use str_extract_all() in R

How to Use str_replace_all in R

How to Use str_extract in R

How to Use str_detect in R

How to Use the trimws Function in R

How to Replace Values in a Matrix in R

How to Replace NAs with Strings in R

How to Replace Zero with NA in R

How to Replace Inf Values with NA in R

How to Replace Blanks with NA in R

How to Replace Values in Data Frame in R

How to Use mapvalues() Function in r

How to Replace Values in Data Frame Conditionally in R

How to Split Column Into Multiple Columns in R

How to Use setdiff in R

How to Use the droplevels Function in R

How to Reorder Factor Levels in R

Format Numbers as Percentages in R

Partial String Matching in R

How to Create Categorical Variables in R

How to Split Data into Training & Test Sets in R

How to Use createDataPartition() Function in R

How to Use sample.split() Function in R

**How to Fix Common Errors****How to Suppress Warnings in RHow to Fix: object not foundHow to Fix: ‘x’ must be numericHow to Fix: subscript out of boundsHow to Fix: stat_bin() using bins = 30How to Fix: unexpected ‘else’ in “else”How to Fix in R: invalid graphics stateHow to Fix: system is exactly singularHow to Fix: argument is of length zeroHow to Fix: Unexpected String ConstantHow to Fix: NAs Introduced by CoercionHow to Fix: replacement has length zeroHow to Fix: could not find function “%>%”How to Fix: could not find function “ggplot”How to Fix: reached getOption(“max.print”)How to Fix in R: invalid type (list) for variableHow to Fix: The following objects are maskedHow to Fix: plot.new has not been called yetHow to Fix: incorrect number of dimensionsHow to Fix: error in select unused argumentsHow to Fix: cannot change working directoryHow to Fix: invalid factor level, NA generatedHow to Fix: more columns than column namesHow to Fix: glm.fit: algorithm did not convergeHow to Fix: dim(X) must have a positive lengthHow to Fix: Error: Duplicate identifiers for rowsHow to Fix: not defined because of singularitiesHow to Fix: replacement has X rows, data has YHow to Fix: Error: attempt to apply non-functionHow to Fix: names do not match previous namesHow to Fix: invalid model formula in ExtractVarsHow to Fix: Cannot add ggproto objects togetherHow to Fix: duplicate ‘row.names’ are not allowedHow to Fix Error in R: non-conformable argumentsHow to Fix: $ operator is invalid for atomic vectorsHow to Fix: missing value where true/false neededHow to Fix in R: ‘height’ must be a vector or a matrixHow to Fix: object of type ‘closure’ is not subsettableHow to Fix: incorrect number of subscripts on matrixHow to Fix: argument “no” is missing, with no defaultHow to Fix: error in rep(1, n) : invalid ‘times’ argumentHow to Fix: Cannot use `+.gg()` with a single argumentHow to Fix: error: `mapping` must be created by `aes()`How to Fix: non-numeric argument to binary operatorHow to Fix: there are aliased coefficients in the modelHow to Fix: Arguments imply differing number of rowsHow to Fix: Discrete value supplied to continuous scaleHow to Fix: error in plot.new() : figure margins too largeHow to Fix: invalid (do_set) left-hand side to assignmentHow to Fix: (list) object cannot be coerced to type ‘double’How to Fix: no non-missing arguments to min; returning InfHow to Fix: argument is not numeric or logical: returning naHow to Fix: incomplete final line found by readTableHeaderHow to Fix: aggregate function missing, defaulting to ‘length’How to Fix: Error in plot.window(…) : need finite ‘xlim’ valuesHow to Fix: error in file(file, “rt”) : cannot open the connectionHow to Fix: error in lm.fit(x, y, offset = offset, …) : na/nan/inf in ‘y’How to Fix: Error in eval(predvars, data, env) : object ‘x’ not foundHow to Fix: prediction from a rank-deficient fit may be misleadingHow to Fix: error in strsplit(unitspec, ” “) : non-character argumentHow to Fix: Error in n() : This function should not be called directlyHow to Fix: glm.fit: fitted probabilities numerically 0 or 1 occurredHow to Fix: Error in colMeans(x, na.rm = TRUE) : ‘x’ must be numericHow to Fix: geom_path: Each group consists of only one observationHow to Fix: character string is not in a standard unambiguous formatHow to Fix in R: Error in as.Date.numeric(x) : ‘origin’ must be suppliedHow to Fix: Error in stripchart.default(x1, …) : invalid plotting methodHow to Fix: aesthetics must be either length 1 or the same as the dataHow to Fix: missing values are not allowed in subscripted assignmentsHow to Fix: aggregate.data.frame(): arguments must have same lengthHow to Fix: ggplot2 doesn’t know how to deal with data of class unevalHow to Fix: error in sort.int(x, na.last, decreasing, …) : ‘x’ must be atomicHow to Fix: longer object length is not a multiple of shorter object lengthHow to Fix: contrasts can be applied only to factors with 2 or more levelsHow to Fix: error in FUN(newx[, i], …) : invalid ‘type’ (character) of argumentHow to Fix: error in xy.coords(x, y, xlabel, ylabel, log) :’x’ and ‘y’ lengths differHow to Fix: number of rows of result is not a multiple of vector length (arg 1)How to Fix: error in do_one(nmeth) : na/nan/inf in foreign function call (arg 1)How to Fix: `data` must be a data frame, or other object coercible by `fortify()`How to Fix: the condition has length > 1 and only the first element will be usedHow to Fix: randomForest.default(m, y, …) : Na/NaN/Inf in foreign function callHow to Fix: number of items to replace is not a multiple of replacement lengthHow to Fix: error: ‘\u’ used without hex digits in character string starting “‘c:\u”How to Fix: attempt to set ‘colnames’ on an object with less than two dimensionsHow to Fix: Don’t know how to automatically pick scale for object of type functionHow to Fix: error in rbind(deparse.level, …) : numbers of columns of arguments do not match**

**The Tidyverse**

The **tidyverse** is a collection of R packages specifically designed for data science. The following tutorials explain how to use various functions in these packages.

**dplyr **– A package designed for manipulating data.**How to Arrange Rows Using dplyrHow to Arrange Rows by Group Using dplyrHow to Arrange Rows in Custom Order Using dplyrHow to Use arrange() with String in dplyrHow to Remove Rows Using dplyrHow to Remove Last Row in Data Frame Using dplyrHow to Remove Columns Using dplyrHow to Add Columns Using dplyrHow to Use ungroup() in dplyrHow to Use slice_max() in dplyrHow to Use slice_min() in dplyrHow to Add Row to Data Frame Using dplyrHow to Rename Columns Using dplyrHow to Sample by Group Using dplyrHow to Use the near() Function in dplyrHow to Use union() Function in dplyrHow to Use intersect() Function in dplyrHow to Use setequal() Function in dplyrHow to Use setdiff() Function in dplyrHow to Perform Row-wise Operations in dplyrHow to Combine Data Frames Using dplyrHow to Combine Columns Using dplyrHow to Slice First and Last Row in Each Group in dplyrHow to Use the glimpse() Function in dplyrHow to Use the pull() Function in dplyrHow to Use rename_with() in dplyrHow to Select Columns Based on Multiple Strings in dplyrHow to Round Values in Specific Columns Using dplyrHow to Transpose a Data Frame Using dplyrHow to Pass a String as Variable Name in dplyrHow to Apply Function to Each Row Using dplyrHow to Sum Across Multiple Columns Using dplyrHow to Count Observations by Group Using dplyrHow to Count Distinct Values Using dplyrHow to Calculate a Cumulative Sum Using dplyrHow to Create a Crosstab Using dplyrHow to Filter for Unique Values Using dplyrHow to Use %in% to Filter for Rows with Value in List in dplyrHow to Filter by Date Using dplyrHow to Filter Rows Using dplyrHow to Filter by Row Number Using dplyrHow to Filter by Multiple Conditions Using dplyrHow to Filter Based on Factor Using dplyrHow to Use a Conditional Filter in dplyrHow to Filter Data Frame without Losing NA Rows Using dplyrHow to Group By and Filter Data Using dplyrHow to Find Duplicate Elements Using dplyrHow to Use a “not in” Filter in dplyrHow to Use a “starts with” Filter in dplyrHow to Use top_n() in dplyrHow to Remove Rows with NA Values Using dplyrHow to Join Data Frames on Multiple Columns Using dplyrHow to Perform Left Join Using Selected Columns in dplyrHow to Perform Left Join with Different Column Names in dplyrHow to Perform Left Join and Define NA Values in dplyrHow to Recode Values Using dplyrHow to Reorder Columns Using dplyrHow to Rename Multiple Columns Using dplyrHow to Rename Column by Index Position Using dplyrHow to Group by All But One Column in dplyrHow to Group & Summarize Data Using dplyrHow to Summarise Multiple Columns Using dplyrHow to Summarise Data But Keep All Columns Using dplyrHow to Calculate Summary Statistics Using dplyrHow to Calculate Standard Deviation Using dplyrHow to Find Maximum Value by Group Using dplyrHow to Calculate Mean for Multiple Columns Using dplyrHow to Replace NA with Zero Using dplyrHow to Replace NA with Mean Using dplyrHow to Replace NA with Median Using dplyrHow to Replace String in Column Using dplyrHow to Replace Multiple Values in Data Frame Using dplyrHow to Join Multiple Data Frames Using dplyrHow to Use anti_join in dplyrHow to Use case_when in dplyrHow to Use bind_rows and bind_cols in dplyrHow to Select Random Rows in R Using dplyrHow to Select Columns by Index Using dplyrHow to Select Columns by Name Using dplyrHow to Select Columns that Do Not Start with String in dplyrHow to Select Only Numeric Columns Using dplyrHow to Select Rows of Data Frame by Name Using dplyrHow to Calculate Relative Frequencies Using dplyrHow to Create a Frequency Table by Group Using dplyrHow to Select the First Row by Group Using dplyrHow to Rank Variables by Group Using dplyrHow to Calculate Lag by Group Using dplyrHow to Convert Multiple Columns to Numeric Using dplyrHow to Convert Multiple Columns to Factor Using dplyrHow Use mutate() in dplyrHow to Use n() Function in dplyrHow to Remove First Character from Strings Using dplyrHow to Mutate Variable if Column Contains String in dplyrHow to Use select_if with Multiple Conditions in dplyrHow to Change Factor Levels Using mutate() in dplyrHow to Use mutate() with Multiple Conditions in dplyrHow to Use Conditional Mutate in dplyrHow to Use the slice() Function in dplyrHow to Use the relocate() Function in dplyrHow to Use the ntile() Function in dplyrHow to Use the across() Function in dplyrHow to Use the coalesce() Function in dplyrHow to Use the transmute() Function in dplyr**

**tidyr** – A package designed for creating tidy data.**How to use the spread() functionHow to use the gather() functionHow to use the separate() functionHow to use the unite() functionHow to use the pivot_wider() functionHow to use the pivot_longer() function**

**ggplot2 **– A package designed for visualizing data.**A Complete Guide to the Best ggplot2 ThemesA Complete Guide to the Default Colors in ggplot2A Complete Guide to ggplot2 TitlesHow to Use hjust & vjust to Move Elements in ggplot2How to Change Title Position in ggplot2How to Change Background Color in ggplot2How to Use a Transparent Background in ggplot2How to Add a Confidence Interval in ggplot2How to Create a Q-Q Plot in ggplot2How to Create a Residual Plot in ggplot2How to Add Tables to Plots in ggplot2How to Draw a Trend Line in ggplot2How to Add an Average Line to Plot in ggplot2How to Change Line Colors in ggplot2How to Plot Two Lines in ggplot2How to Create a Density Plot with ggplot2How to Specify Width in geom_boxplot in ggplot2How to Jitter Points in ggplot2How to Change Font Size in ggplot2How to Change Fill and Border Color of Points in ggplot2How to Change Point Size in ggplot2How to Change Point Shape in ggplot2How to Change Line Type in ggplot2How to Add Horizontal Line to Plot and Legend in ggplot2How to Change the Legend Title in ggplot2How to Change Legend Size in ggplot2How to Change Legend Position in ggplot2How to Change Legend Labels in ggplot2How to Plot Multiple Lines in ggplot2How to Connect Points with Lines in ggplot2How to Remove a Legend in ggplot2How to Remove a Legend Title in ggplot2How to Create a Manual Legend in ggplot2How to Create a Legend with Multiple Rows in ggplot2How to Change Order of Items in ggplot2 LegendHow to Change Spacing Between Legend Items in ggplot2How to Add Text to ggplot2 PlotsHow to Change X-Axis Labels in ggplot2How to Group by Two Columns in ggplot2How to Set the Number of Bins for a Histogram in ggplot2How to Create Histograms by Group in ggplot2How to Add Labels to Histogram in ggplot2How to Create Side-by-Side Plots in ggplot2How to Set Axis Limits in ggplot2How to Use scale_x_continuous in ggplot2How to Use scale_y_continuous in ggplot2How to Convert Axis to Percentage Scale in ggplot2How to Create a Bump Chart in R Using ggplot2How to Create a Gantt Chart in R Using ggplot2How to Create a Heatmap in R Using ggplot2How to Overlay Density Plots in ggplot2How to Make Pie Charts in ggplot2How to Create Plot in ggplot2 Using Multiple Data FramesHow to Create a Grouped Boxplot in R Using ggplot2How to Create Side-by-Side Boxplots in RHow to Create a Barplot with Multiple Variables in ggplot2How to Order the Bars in a ggplot2 Bar ChartHow to Reorder Bars in a Stacked Bar Chart in ggplot2How to Create a Horizontal Bar Chart in RHow to Use stat=”identity” in ggplot2 PlotsHow to Sort Bars by Value in ggplot2How to Plot Mean with geom_bar() in ggplot2How to Adjust Space Between Bars in ggplot2How to Change Colors of Bars in Stacked Bart Chart in ggplot2How to Plot a Linear Regression Line in ggplot2How to Plot a Regression Line by Group with ggplot2How to Add a Vertical Line to a Plot Using ggplot2How to Plot Mean and Standard Deviation in ggplot2How to Add Label to geom_vline in ggplot2How to Add Label to geom_hline in ggplot2How to Use geom_abline in ggplot2How to Use geom_text() in RHow to Use geom_label() in ggplot2How to Use geom_segment() in RHow to Use the ggarrange() Function in RHow to Use the patchwork Package in RHow to Use alpha with geom_point() in ggplot2How to Use stat_summary() Function in ggplot2How to Use geom_errorbar() Function in ggplot2How to Add a Horizontal Line to a Plot Using ggplot2How to Create a Log Scale in ggplot2How to Create Smooth Lines in ggplot2How to Plot a ROC Curve Using ggplot2How to Plot Mean Line by Group in ggplot2How to Assign Colors by Factor in ggplot2How to Adjust Line Thickness in ggplot2How to Use facet_wrap in ggplot2How to Change Facet Axis Labels in ggplot2How to Change the Order of Facets in ggplot2How to Reverse Order of Axis in ggplot2Difference Between facet_wrap and facet_grid in ggplot2How to Remove NAs from Plot in ggplot2How to Add Panel Border to ggplot2How to Remove Gridlines in ggplot2How to Draw Arrows in ggplot2How to Shade an Area in ggplot2How to Remove Axis Labels in ggplot2How to Rotate Axis Labels in ggplot2How to Rotate Annotated Text in ggplot2How to Modify the Margins in ggplot2How to Fix the Aspect Ratio in ggplot2How to Set Axis Breaks in ggplot2How to Set Axis Label Position in ggplot2How to Order Items on x-axis in ggplot2How to Order Y-Axis Labels Alphabetically in ggplot2How to Change Number of Axis Ticks in ggplot2How to Use the ggpairs() Function in ggplot2How to Add Caption to ggplot2 PlotsHow to Add Subtitle in ggplot2How to Add Footnote to ggplot2 PlotsHow to Adjust Line Thickness in Boxplots in ggplot2How to Label Outliers in Boxplots in ggplot2How to Use ggsave() to Save ggplot2 Plots**