dplyr select(): Select one or more variables from a dataframe

dplyr select(): How to Select Columns?

dplyr, R package part of tidyverse, provides a great set of tools to manipulate datasets in the tabular form. dplyr has a set of core functions for “data munging”. Here is the list of core functions from dplyr select() picks variables based on their names. mutate() adds new variables that are functions of existing variables… Continue reading dplyr select(): Select one or more variables from a dataframe

ggplot2 3.3.0. Is Here : Two New Features You Must Know

ggplot2, the R package that lets you create graphics using the Grammar of Graphics has a new version. The new version of ggplot2; version 3.3.0 has lots of changes and it available on CRAN. Introducing ggplot2 v 3.3.0 Thomas Lin Pedersen says that the new version “is packed with features, big and small” and a… Continue reading ggplot2 3.3.0. Is Here : Two New Features You Must Know

Faceting and Reordering with ggplot2

Faceting and reordering: reorder_within() tidytext

Faceting is a great data visualization technique that uses “small multiples” i.e. the use of same type of plots multiple times in a panel. Each “small multiple” is a same type of plot but for a different group or category in the data. ggplot2 makes it really easy to make such “small multiples” with faceting.… Continue reading Faceting and Reordering with ggplot2

How To Change Legend Title in ggplot2?

ggplot2 change legend title with guides()

In this post, we will see multiple examples of how to change the legend title in ggplot2. When you make a plot with ggplot2 and color/highlight data points by a variable in the input dataframe, ggplot2 uses the name of the variable present in the dataframe. However, sometimes you might want to change the legend… Continue reading How To Change Legend Title in ggplot2?

How To Change Axis Tick Marks in R?

One of most common things one might do while making plots is to change tiny details of the plot to make them better. Often, one of such adjustments are changing x-axis tick mark label/text on a plot made with ggplot2 in R. Let us use ggplot2 to make plot first and then fix its x-axis… Continue reading How To Change Axis Tick Marks in R?