Winston Chang from RStudio quietly announced last week that the second edition of his popular R Graphics Cookbook: Practical Recipes for Visualizing Data is available now to buy. Not just that, the book is also available online for free at https://r-graphics.org/. Winston Chang’s first edition of R Graphics Cookbook was the first R book I […]
R
PCA example using prcomp in R
In this tutorial, we will learn how to perform PCA in R using prcomp() function in R. Principal Component Analysis, aka, PCA is one of the commonly used approaches to do unsupervised learning/ dimensionality reduction. It is a fantastic tool to have in your data science/Machine Learning arsenal. You will be surprised how often the […]
Introduction to nest() in tidyr
Grouping our data in specific ways and analyzing is often the most common way to make interesting observations about the data. R tidyverse offers fantastic tool set to analyze data by grouping in different ways. Tidyverse dplyr’s group_by() is one of the basic verbs that is extremely useful in most common data analyis scenarios. nest() […]
How to Recode a Column with dplyr in R?
Sometimes, when working with a dataframe, you may want the values of a variable/column of interest in a specific way. You might like to change or recode the values of the column. R offers many ways to recode a column. Here we will see a simple example of recoding a column with two values using […]
Getting started with ggforce – a ggplot2 extension package
ggforce, R package extension for ggplot, has got a big upgrade with lot of new functions. ggforce was introduced about to years ago with the aim to provide missing functionalities in ggplot2. ggforce provides a a repository of geoms, stats, etc. that are as well documented and implemented as the official ones found in ggplot2. […]