Often you may want to use functions from the dplyr package in R to combine multiple columns in a data frame into a single column.…

Hey there. My name is Zach Bobbitt. I have a Masters of Science degree in Applied Statistics and I’ve worked on machine learning algorithms for professional businesses in both healthcare and retail. I’m passionate about statistics, machine learning, and data visualization and I created Statology to be a resource for both students and teachers alike. My goal with this site is to help you learn statistics through using simple terms, plenty of real-world examples, and helpful illustrations.

When creating lists in R, you can provide names to each of the elements in the list so that you can extract specific elements from…

In statistics, the standard error of the mean is a way to measure how spread out values are in a dataset. It is calculated as:…

Often you may want to reduce a list in R to a single value by iteratively applying a binary function. Fortunately this is easy to…

When you perform a left join in dplyr, you are able to return all rows from one particular data frame and then only the rows…

Often you may want to check for outlier observations in a linear regression model. This is important to do because outliers can affect the overall…

You can use the arrange() function in the dplyr package in R to order rows based on column values. Often you may want to use…

You can use the geom_label() function in ggplot2 to add text labels inside a rectangular box to a plot. This function uses the following basic…

Often you may want to check if two data frames contain the same rows (regardless of order) in R. Fortunately this is easy to do…

Often you may want to use a “foreach” style loop in which you can perform a specific task on each item in a loop in…