## R is Not So Hard! A Tutorial, Part 22: Creating and Customizing Scatter Plots

In our last post, we calculated Pearson and Spearman correlation coefficients in R and got a surprising result. So let’s investigate the data a ... Continue Reading

## Generalized Linear Models in R, Part 7: Checking for Overdispersion in Count Regression

In my last blog post we fitted a generalized linear model to count data using a Poisson error structure. We found, however, that there was ... Continue Reading

## Generalized Linear Models in R, Part 6: Poisson Regression for Count Variables

In my last couple of articles (Part 4, Part 5), I demonstrated a logistic regression model with binomial errors on binary data in R’s glm() ... Continue Reading

## Generalized Linear Models in R, Part 5: Graphs for Logistic Regression

In my last post I used the glm() command in R to fit a logistic model with binomial errors to investigate the relationships between the numeracy and ... Continue Reading

## Linear Models in R: Plotting Regression Lines

Today let’s re-create two variables and see how to plot them and include a regression line. We take height to be a variable that describes the heights ... Continue Reading

## R Graphics: Plotting in Color with qplot Part 2

In the last lesson, we saw how to use qplot to map symbol colour to a categorical variable. Now we see how to control symbol colours and create legend ... Continue Reading

## R Graphics: Plotting in Color with qplot

In this lesson, let’s see how to use qplot to map symbol colour to a categorical variable. Copy in the following data set (a medical data set ... Continue Reading

## Doing Scatterplots in R

In this lesson, we see how to use qplot to create a simple scatterplot. The qplot (quick plot) system is a subset of the ggplot2 (grammar of ... Continue Reading

## Graphing Non-Linear Mathematical Expressions in R

In this lesson, let’s see how to create mathematical expressions for your graph in R.  We'll use an example of graphing a cosine curve, along with ... Continue Reading

## Generalized Linear Models in R, Part 3: Plotting Predicted Probabilities

In our last article, we learned about model fit in Generalized Linear Models on binary data using the glm() command. We continue with the same glm on ... Continue Reading

## R Is Not So Hard! A Tutorial, Part 13: Box Plots

In Part 13, let’s see how to create box plots in R. Let’s create a simple box plot using the boxplot() command, which is easy to use. First, we set up ... Continue Reading

## R is Not So Hard! A Tutorial, Part 12: Creating Histograms & Setting Bin Widths

I'm sure you've heard that R creates beautiful graphics. It's true, and it doesn't have to be hard to do so.  Let’s start with a simple histogram ... Continue Reading

## R Is Not So Hard! A Tutorial, Part 11: Creating Bar Charts

Let’s create a simple bar chart in R using the barplot() command, which is easy to use. First, we set up a vector of numbers. Then we count them ... Continue Reading

## R Is Not So Hard! A Tutorial, Part 7: More Plotting in R

In Part 7, let’s look at further plotting in R. Try entering the following three commands together (the semi-colon allows you to place several ... Continue Reading

## R Is Not So Hard! A Tutorial, Part 6: Basic Plotting in R

In Part 6, let’s look at basic plotting in R.  Try entering the following three commands together (the semi-colon allows you to place several commands ... Continue Reading

## R Is Not So Hard! A Tutorial, Part 5: Fitting an Exponential Model

In Part 3 and Part 4 we used the lm() command to perform least squares regressions. We saw how to check for non-linearity in our data by fitting ... Continue Reading

## R Is Not So Hard! A Tutorial, Part 4: Fitting a Quadratic Model

In Part 3 we used the lm() command to perform least squares regressions. In Part 4 we will look at more advanced aspects of regression models and see ... Continue Reading

## R Is Not So Hard! A Tutorial, Part 3: Regressions and Plots

In Part 2 of this series, we created two variables and used the lm() command to perform a least squares regression on them, treating one of them as ... Continue Reading

## R is Not So Hard! A Tutorial, Part 2: Variable Creation

In Part 1 we installed R and used it to create a variable and summarize it using a few simple commands. Today let’s re-create that variable and also ... Continue Reading