This week, we will see how to connect two points with a straight line in base R and ggplot2. For this, we need to compute the slope and the intercept.…
We will see how to perform exponential regressions and how to plot these curved regression lines in base R and ggplot2, using the lines and geom_line functions, respectively. Please read…
In this tutorial, we will see how to perform a local polynomial regression using the loess function and how to plot curved regression lines in base R and ggplot2. We…
We will see how to perform a linear regression using the lm function and to plot these straigth regression lines in base R and ggplot2, using the lines and geom_abline…
In this article, we will see how to add straight (vertical, horizontal and diagonal) lines to plots in base R and in ggplot2. As an example, we will use the…
Today, we will see how to add significance levels to box plots in R. Data will be processed with the tidyr package, the plot will be made with ggplot2 and…
In this tutorial, we will see how to make bar plots with error bars in R using the ggplot2 package. For that, we will go through two examples using the…
Today, we will see how to create and label dendrograms in R with base R functions. How to make dendrograms First, we will make a dendrogram on the same data…
In this tutorial, we will see how to create and rotate 4 types of heatmaps in R with the ggplot2 package. In heatmaps, the diagonal line is always 1, which…
Today, we will see how to create Venn diagrams in R using the VennDiagram package and the USArrests buit-in dataset. Prepare the dataset data("USArrests") dataset = USArrests dataset[, "State"] =…
Today, we will see how to plot 3D histograms in R using the hist3D function from the plot3D package. As an example, I will use the iris built-in dataset. In…
Before digging into permutations and combinations in R using iteration, I invite you to read my first post. Indeed, I have already: covered the difference between permutations (order matters) and combinations (order…
Permutations and combinations are different ways of selecting a certain number of items from a set to create subsets. In both cases, we can allow item repetition or not. However,…
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok