OptinMon 34 - Getting Started with R

R Is Not So Hard! A Tutorial, Part 15: Counting Elements in a Data Set

August 13th, 2014 by

Combining the length() and which() commands gives a handy method of counting elements that meet particular criteria.

b <- c(7, 2, 4, 3, -1, -2, 3, 3, 6, 8, 12, 7, 3)
b

Let’s count the 3s in the vector b. (more…)


Random Sample from a Uniform Distribution in R Commander

July 23rd, 2014 by

Why We Needed a Random Sample of 6 numbers between 1 and 10000

As you may have read in one of our recent newsletters, this month The Analysis Factor hit two milestones:

  1. 10,000 subscribers to our mailing list
  2. 6 years in business.

We’re quite happy about both, and seriously grateful to all members of our community.

So to celebrate and to say thanks, we decided to do a giveaway to 6 randomly-chosen  newsletter subscribers.

I just sent emails to the 6 winners this morning.

How We Randomly Generated 6 Equally Likely Values out of 10000 Using R Commander (more…)


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

July 2nd, 2014 by

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 the mtcars data set (regressing the vs variable on the weight and engine displacement).

Now we want to plot our model, along with the observed data.

Although we ran a model with multiple predictors, it can help interpretation to plot the predicted probability that vs=1 against each predictor separately.  So first we fit a glm for only (more…)


R Is Not So Hard! A Tutorial, Part 14: Pie Charts

March 27th, 2014 by

In Part 14, let’s see how to create pie charts in R. Let’s create a simple pie chart using the pie() command. As always, we set up a vector of numbers and then we plot them.

B <- c(2, 4, 5, 7, 12, 14, 16) (more…)


R Programming Video: 15 Tips for The Beginner

March 25th, 2014 by

One of our instructors–David Lillis–recently gave a talk in front of the Wellington R Users Group highlighting 15 Tips for using the R statistical programming language aimed at the beginner.

Below is a video recording of his presentation…

 


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

March 17th, 2014 by

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 a vector of numbers and then we plot them.

Box plots can be created for individual variables or for variables by group (more…)