Summer Deals - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Introduction to lists
Accessing list elements
Unnamed lists
Working with lists
25. Adding a new member to a list
Summary

Instruction

Great! It's also possible to add new members to a list.

After speaking with Emma, we also learned that she will require a visa to work in England. We can add this new information to the list like so:

candidate$sponsorship_required <- "Yes"

Here's what the new list looks like:

> candidate
$name
[1] "Emma Stone"
$age
[1] 31
$country
[1] "England"
$languages
[1] "English" "Dutch"   "French" 
$prior_working_experience
          year company     job_role
1 2011- present  Viscan data analyst
2     2007-2011 Terramy data analyst
3    2001- 2007 Nestico    developer
$applied_position
[1] "Data scientist"
$sponsorship_required
[1] "Yes"

Keep in mind that same info could be stored in the sponsorship_required member like this:

candidate[["sponsorship_required"]] <- "Yes"

Exercise

After chatting with Emma, you also learned that she's very "communicative", "open minded", and a "team player" (in that order). Store this information in a new member of candidate named additional_skills for future reference.