Not an R tutorial

HOME So you want to learn R? Well, there's lots of resources for learning R on the internet. But perhaps too much, so unless you have a specific question or a specific error message you can enter into the search engine, you can spend a lot of time searching for needles in haystacks.

I've just been using Google to find basic information about key concepts in R, and found it difficult to find good sources. Many of the pages go into unnecessary detail, assume a background in programming in other languages, or use abstruse examples.

So some recommendations seem to be in order.

In general, I found YouTube videos to be more appropriate for R beginners than most web pages. The videos from DataCamp are particularly impressive, being conceptually clear and professional. Maybe I should just recommend folks sign up for DataCamp, but I haven't looked at their actual courses.

The following are just some of the best links I came across during a few hours with Google. Let me know if you have your own suggestions: stats[dot]bcss[at]gmail[dot]com.

A bit of everything

Quick-R Data types - a quick overview of vectors, matrices, data frames, lists, and factors.


DataCamp VDO How to create and name vectors in R

DataCamp VDO Subsetting your Vectors in R

The Academician VDO  Special values NA Inf NaN NULL

Data Mentor R Vector


DataCamp VDO Learn How to Create and Name Matrices in R

DataCamp VDO Learn How to Subset Matrices in R

Data Mentor R matrix


DataCamp VDO Using Factors in R

Data frames

DataCamp VDO Using the Data Frame in R

DataCamp VDO Introduction and read.csv

DataCamp VDO Learn How to Subset, Extend & Sort Data Frames in R

Statistics with R: Selecting a subset of variables from a dataframe using subset()


Ed Boone VDO Introduction to lists

DataCamp VDO How to create and name lists in R


Richard Webster For Loops in R (includes nested loops)


Specific questions or error messages

If you have a specific question or an error message you don't understand, enter (or copy paste) into your search engine and look for results from stackoverflow or R-bloggers, or the official R help forum at

Updated 6 Aug 2018 by Mike Meredith