R for Marketing Research and Analytics

Chris Chapman and Elea McDonnell Feit
January 2016

Chapter 1: Welcome to R

Website for all data files:
http://r-marketing.r-forge.r-project.org/data.html

  • These slides are a companion to the book R for Marketing Research and Analtyics. The book is for:
    • Marketing research practitioners seeking to learn R.
    • Data scientists interesting in marketing applications.
    • Marketing students and academics interested in practical applications.
  • Companion code files are available at (http://r-marketing.r-forge.r-project.org/), but we suggest you type each line of code, to begin developing your R skills.

About the authors

Dr. Chris Chapman is a Senior Quantitative Experience Researcher for the Google Cloud Platform, based in the Seattle office.

Dr. Elea McDonnell Feit is an Assistant Professor of Marketing at Drexel University and a Senior Fellow of the Wharton Customer Analytics Initiative.

What is R?

“R is a language and environment for statistical computing and graphics.” http://www.r-project.org/about.html

R is:

  • A programming language (not a “stats program'')
  • An environment for writing code and handling data
  • User extensible through add ons and custom code
  • Open source and freely available
  • Where new statistics and analytics innovation most often happen first

Why NOT R?

  • Full control == more complexity
  • Steep learning curve
  • Don't try to learn R when time is critical!

And perhaps most importantly:

  • R is a programming language.
  • If you have tried computer programming and didn't like it, you probably won't like R

What do you need to use R?

At a minimum:

Also recommended:

RStudio is free and will make your life much easier! To use RStudio, first install R and then install RStudio separately.

Now ...

Make sure R and RStudio are up and running on your systems!

Once it is working for everyone, we'll start with the language.