Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Introduction to lists
Accessing list elements
Unnamed lists
Working with lists
Summary

Instruction

Correct! Now that we know how to output the names of a list's members and even modify those names, the following question naturally arises: How can we access one single member of a list and get its values?

There are two ways of doing this. The first approach is to use the double-bracket operator. For example, if a recruiter wants to retrieve a candidate's name from the candidate list, they can write the following:

candidate[["name"]]

With this command, R displays all values of the element name. In our case, "Emma Stone" is displayed on the screen.

Exercise

Display Emma's prior work experience (using the prior_working_experience element from the list candidate).