Autumn Offers - hours only!Up to 80% off on all courses and bundles.-Close
Introduction to lists
Accessing list elements
Unnamed lists
Working with lists


So far, we've only looked at lists whose members are named, but that's not always going to be the case – members can be unnamed. Let's look at the job_role list again. This time, we'll call the list job_role_no_names for clarity.

[1] "Data scientist" 

[1] 10 

[1] "R"        "Python" "Spark"    "Cloudera" "Hive" "Impala"

Notice that we can't see any member names in this list – there's no dollar sign followed by a name. Instead, we see sequential numbers in double brackets: [[1]], [[2]], and [[3]]. These are the positions of the list's members. So [[1]] denotes the first member of the list, [[2]] the second one, and so on.


Run the template.