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 then we will show example where we have… Continue reading How to Compute Z-Score of Multiple Columns
Category: R Function
How to drop unused level of factor variable in R
In this post, we will learn how to drop unused level or levels of a factor variable in R. Sometimes, we may end up with a factor variable with un used levels after some data munging. Unused factor levels can sometime create issues while analyzing the data. In this tutorial, we will show how to… Continue reading How to drop unused level of factor variable in R
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 standardize/normalize a numerical variable. Transforming numerical variables into Z-scores enable us to… Continue reading How to compute Z-score
How to perform multiple t-tests using tidyverse
In this tutorial, we will learn how to perform multiple t-tests to determine if there is any difference in mean using tidyverse framework. With tidyverse framework, we will use tidyverse packages/functions instead of looping through using a for loop. Let us load the packages needed. We have tow examples of using tidyverse to perform multiple… Continue reading How to perform multiple t-tests using tidyverse
How to select top and bottom rows by a column simultaneously
In this tutorial, we will learn how to select top and bottom rows of a dataframe based on the values of a column with tidyverse in R. Here we will see a specific approach to get top and bottom rows when the values of the column of interest has both positive and negative values. This… Continue reading How to select top and bottom rows by a column simultaneously