Creating your first R package from scratch can look really daunting at first. The modern toolkits like RStudio IDE and devtools R package make it a lot easier to get started and create a new R package. Recently came across the second edition of R Packages book by Hadley Wickham and Jenny Bryan and it […]
R Tips
How To Highlight Select Data Points with ggplot2 in R?
The power of ggplot2 lies in making it easy to make great plots and in easily tweaking it to the one wants. Sometimes, one might want to highlight certain data points in a plot in different color. Here we will see an example of highlighting specific data points in a plot. Let us first load […]
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 […]
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. […]