Exercise

Creating and exploring environments

Environments are used to store other variables. Mostly, you can think of them as lists, but there's an important extra property that is relevant to writing functions. Every environment has a parent environment (except the empty environment, at the root of the environment tree). This determines which variables R know about at different places in your code.

Facts about the Republic of South Africa are contained in capitals, national_parks, and population.

Instructions 1/3

undefined XP
    1
    2
    3
  • Create rsa_lst, a named list from capitals, national_parks, and population. Use those values as the names.
  • List the structure of each element of rsa_lst using ls.str().