In this post, we will learn how to compute Z-score of multiple variables (columns) at the same time using tidyverse in R using multiple approaches. First, we will show an example of computing Z-score of multiple columns, where all the columns in the dataframe is numeric and … [Read more...] about How to Compute Z-Score of Multiple Columns
rstats101
How to compute Z-score
In this post, we will learn how to compute Z-score in R using two different approaches, first manually by using the z-score formula and then using scale() function available in base R. What is Z-score Z-score is a commonly used transformation technique to … [Read more...] about How to compute Z-score
How to Compute Compound Interest with Tidyverse
In this post, we will learn how to calculate compound interest in R using tidyverse framework. Getting an intuition behind how compound interest can influence investing returns is wxtremely useful in personal final. On a high level, compounding interest refers to the process of … [Read more...] about How to Compute Compound Interest with Tidyverse
dplyr rows_update(): Modify existing rows
In this post, we will learn how to use dplyr's rows_update() function with examples. dplyr's rows_update() function is a useful function to modify or update specific rows in a data frame based on a matching values in key column. It takes in two dataframes x and y, updates … [Read more...] about dplyr rows_update(): Modify existing rows
dplyr n_distinct(): count unique elements or rows
In this post, we will learn how to use dplyr's n_distinct() function to count the number of unique or distinct values in one or more vectors or columns of a dataframe. dplyr's n_distinct() is very useful when you are working with a dataframe and need to know how many unique … [Read more...] about dplyr n_distinct(): count unique elements or rows