In this post we will learn under what circumstances we will see a ggplot2 error that says something like “replacement has 9 rows, data has 8” in addition to other text that is not easily understood. We will also see an easy fix to such a difficult sounding error. Let us say we are trying… Continue reading ggplot2 error: how to fix error in dataframe
Tag: ggplot2 error
ggplot2 error: Cannot use `+.gg()` with a single argument.
In this post, we will learn how to fix one of the common ggplot2 error messages. While trying to make a ggplot2, we might get the following error. The error message here ” Did you accidentally put + on a new line?” is bit helpful as it hints what is the cause of the error.… Continue reading ggplot2 error: Cannot use `+.gg()` with a single argument.
Error in ggplot(): Mapping should be created with `aes()`
In this post we will see an example of one of most common errors while making a plot with ggplot2 and how to fix them. Let us we are trying to make a scatter plot using ggplot2 using the following code. Here we use mtcars dataset built-in R to make the scatter plot If we… Continue reading Error in ggplot(): Mapping should be created with `aes()`
ggplot2 errot: how to fix could not find function “ggplot
In this post we will learn how to fix one of the most common ggplot2 errors, saying “could not find function “ggplot”” Let us consider an example where we are trying to make boxplot using iris, one of the R built-in datasets. We have been extra careful and write a perfect R code as show… Continue reading ggplot2 errot: how to fix could not find function “ggplot