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 […]
tidyverse 101
dplyr count(): Explore Variables with count in dplyr
In this tutorial, we will see examples of using count() function from dplyr to explore variables in a dataframe. One of the first things to do after loading a data is to perform simple exploratory data analysis. One typically starts data exploration with a quick look at the data with functions like glimpse() or head(). […]
How To Get A Peek at Dataframe in R
Getting a quick look at the dataframe to understand the variables we have or data types is an important aspect of data analysis. If you are used to working with excel, your first impulse is to open the data in excel. However, getting a look at the data programmatically in R has many advantages including […]
9 Tips to Make Better Scatter Plots with ggplot2 in R
Scatter plot is one of the common data visualization method used to understand the relationship between two quantitative variables. When there is strong association between two variables you would easily see the relationship with scatterplot. However, when the relationship is subtle it may be tricky to see it. In this post we will see 9 […]
How To Change Legend Title in ggplot2?
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 […]