Consider the following list, l1.
$name
[1] "bob"
$age
[1] 25
$height
[1] 180
$eyes
[1] "blue"
Which of the following expressions will change the value of the eyes slot in l1 from “blue” to “green”?
- Wrong: This command doesn’t actually change anything.
- Correct
- Wrong: There is no slot named “4” in l1.
- Wrong: This command will change the name of the fourth slot, not the contents of that slot.
- Wrong: We’re replacing the value of
l4$eyeswith the contents of the objectgreen, not the character vector"green".