Often you may want to split one column in R into multiple columns based on a specific number of characters. There are two common ways…

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.

Often you may want to calculate a cross-tabulation table in R to summarize the relationship between two categorical variables. Fortunately this is easy to do…

Often you may want to plot a two-dimensional non-parametric distribution in R. The easiest way to do so is by using the plotMP() function from…

Often you may want to find all rows in one data frame that do not occur in another data frame in R. Fortunately this is…

Often you may want to extract only the time from a datetime object in R. Fortunately this is easy to do by using the as_hms()…

Often you may want to calculate the age of an individual in R. Fortunately this is easy to do by using the interval() function from…

Often you may want to either get the current year or set the current year in R. Fortunately this is easy to do by using…

Often you may want to calculate the difference between two dates in R. Fortunately this is easy to do by using the interval() function from…

Often you may want to return all rows that occur in both of two data frames in R. Fortunately this is easy to do by…

Often you may want to return all rows that exist in either one of two data frames in R. Fortunately this is easy to do…