by Suf | May 31, 2022 | Programming, R, Tips
This tutorial will go through adding the regression line equation and R-squared to a plot in R with code examples. Table of contentsWhat is the Regression Equation?What is the R-Squared Value?Example: Using ggpubrCreate DataPlot Data and Add Regression EquationPlot...
by Suf | May 30, 2022 | Programming, R, Tips
This error occurs when you call the rep function to replicate data, but the value you provide to replicate the number is not a positive real number. You can solve this problem by ensuring that the number is a single, positive real number. This tutorial will go through...
by Suf | May 29, 2022 | Programming, R, Tips
The pipe operator, %>%, is a special function available under the magrittr package that allows you to pass the result of one function/argument to the other one in sequence. To use the pipe operator, you need to install and load the magrittr package....
by Suf | May 28, 2022 | Programming, R, Tips
This tutorial will go through how to remove outliers from a boxplot using ggplot2 in R with the help of code examples. Table of contentsExampleRemove Outlier Using outlier.shape=NASummary Example In the following example, we are going to use the iris dataset to create...
by Suf | May 28, 2022 | Programming, R, Tips
The easiest way to place two plots side by side using ggplot2 is to install gridExtra and then use the grid.arrange() function. For example, install.packages(“gridExtra”) grid.arrange(plot1, plot2, ncol=2) This tutorial will go through how to place two...
by Suf | May 27, 2022 | Programming, Rust, Tips
We can calculate the absolute value of a number using the abs() method. We have to specify the numeric type before we call the abs method, for example, if we want a 32-bit signed integer we need to put i32 after the number. This tutorial will go through how to...