Introduction

Instruction

Okay, but what if we need only the 4th value of our vector? No problem! We will simply extract that value by passing in the index 4, like this:

numbers[4]

Unlike in other languages, vectors in R start with an index of 1, not 0.

Exercise

Extract the second name from the names vector you created earlier.

Stuck? Here's a hint!

Just type:

names[2]