Sometimes, when one is making boxplot with ggplot2, one might like to order the boxes in a boxplot in a specific way. For example, one might want to sort the boxes in boxplot in ascending or descening order based on the mean or median values of groups in the boxplot. Reordering boxplots can reveal the […]
ggplot2
ggplot2 Version 3.0.0 Brings Tidy Evaluation to ggplot
RStudio has unveiled major updates to ggplot2 with new version 3.0.0. The new ggplot2 version is available on CRAN about two weeks ago. ggplot2 3.0.0 was originally announced as ggplot2 2.3.0, but big updates made RStudio to bump the version number to 3.0.0. One of the biggest additions in the new version is that ggplo2 […]
How to Make Boxplot in R with ggplot2?
One of many strengths of R is the tidyverse packages and the ability to make great looking plots easily. Boxplot or Box and Whisker plot, introduced by John Tukey is great for visualizing data from multiple groups/ distributions. Boxplot allows you to actually display the data together with efficient summary of the data using min, […]
Why can’t ggplot2 use %>% instead of “+”?
Have you ever mixed up dplyr’s pipe operator or magittr %>% with ggplot’s “+” while piping dplyr commands with ggplot2, you are not alone. Depending on where you misused “%>%” for “+”, you might get confusing errors like Error: Mapping must be created by `aes()` or `aes_()` Error in as.vector(x, “character”) : cannot coerce type […]