In this tutorial, we will learn how to count the number missing values, NAs, in each row of a dataframe in R. We will see examples of counting NAs per row using four different approaches. For the first two solutions, we will use tidyverse function rowwise() from dplyr. The next … [Read more...] about How to count number of missing values per row in a dataframe
How to Extract p-values from multiple simple linear regression models
Sometimes you might fit many simple linear regression models and would like to extract p-values from each model. In this tutorial, we will learn two approaches to extract p-values from multiple simple linear regression models built in R. We will first use for loop to build and … [Read more...] about How to Extract p-values from multiple simple linear regression models
How to extract residuals from a linear regression model
In this tutorial, we will learn how to extract residual values from a linear regression model in R. Residuals are values that is remaining after adjusting or subtracting effects of variable in the model. We will see two approaches to pull residuals from linear regression model … [Read more...] about How to extract residuals from a linear regression model
How to get p-value from linear regression model
In this tutorial, we will learn how to extract p-value from a linear regression fit object in R. We will use two approaches to pull out p-value and other statistics of interest from a linear regression model. First we will extract the p-value directly from summary of the linear … [Read more...] about How to get p-value from linear regression model
list.files() in R: list files in a directory
In tutorial, we will learn how to list all the files in a directory in R. With list.files() function in R we can get all the files in a folder or directory as a vector. Here we will see multiple examples of using list.files() to get the files in a directoy, files matching a … [Read more...] about list.files() in R: list files in a directory