In this tutorial, we will learn how to compute Pearson correlation of multiple variables. We will use two approaches to compute Pearson correlation of multiple variables in a matrix or dataframe. First we will show how to use cor() function in R to compute Pearson correlation … [Read more...] about How to Compute Pearson Correlation of Multiple Variables
T-test on real data using tidyverse
In this post, we will learn how to perform t-test on a real dataset and use tidyverse framework to access results from t-test. Check out the post how to do t-test to learn base R approach to t-tes. We will use Palmer penguin dataset, a real world dataset, to show how to … [Read more...] about T-test on real data using tidyverse
How to perform t-test in R
In this post, we will learn how top perform t test in R and understand when and why to use it. A t-test is one of the commonly used statistical tests, when one is interested in comparing two groups of measures and determine if there is a significant difference between the mean … [Read more...] about How to perform t-test in R
expand_grid(): Create all possible combinations of variables
In this tutorial, we will learn how to create all possible combinations of two variables using tidyr's expand_grid() function. For example, if we have two variables of interest and want to create a dataframe with all possible combinations of the values of the two variables, we … [Read more...] about expand_grid(): Create all possible combinations of variables
How to convert a list to a dataframe
In this tutorial, we will learn 3 different ways to convert a list object into a dataframe in R. First we will show how to use the base R function as.data.frame() to convert a list to a dataframe. Then we will show examples using map_df() function in purrr package in tidyverse … [Read more...] about How to convert a list to a dataframe