Finally got my hands on to the physical copy of the amazing Introduction to Statistical Learning with Applications in R (ISLR), Second Edition by Gareth James, Daniela Witten, Trevor Hastie, Rob Tibshirani . And it felt good to donate the first version to a local library. In this post, we learn how to use SVD, […]
R
14 Tips to Work with Dates in tidyverse
In this quick post we will see 14 simple tips that will help get started dealing with date as variable instead of a string. We will see tips on how to create a date variable in few different ways and get components of date variable using the R package lubdridate. The R package lubdridate was […]
6 Tips to change column positions with dplyr’s relocate()
Sometimes you want to change the order of columns in a dataframe. dpyr’s relocate() function makes it easy to move one or more columns to new positions easily by using the same syntax as select() function. In this post we will see 7 tips to change column order or column position using dplyr’s relocate(). Let […]
6 Dimensionality Reduction Techniques in R (with Examples)
Dimension Reduction techniques are one of the most useful methods in unsupervised learning of high dimensional datasets. In this post, we will learn how to use R to perform 6 most commonly used dimensionality reduction techniques, PCA: Principal Component Analysis SVD: Singular Value Decomposition ICA: Independent Component Analysis NMF: Non-negative Matrix Factorization tSNE UMAP We […]
13 Tips to Randomly Select Rows with tidyverse
In this post, we will learn how to randomly sample rows from a data frame that is useful in most common scenarios. Tidyverse has a few options to randomly sample rows from a dataframe. slice_sample() in dplyr is the currently recommended function to use for randomly select rows. The older function in dplyr, sample_n(), for […]