lists in R
Hi, in this exercise I don't understand why for the task " extract the second list as a list" we use the code newList[[2]] and not newList[2].
![](https://365datascience.com/resources/qa-hub/thumb@1170_2020-07-Screenshot-2020-07-16-at-18.03.29-300x140.webp)
![](https://365datascience.com/resources/qa-hub/thumb@1170_2020-07-Screenshot-2020-07-16-at-18.03.29-300x140.webp)
1 answers ( 0 marked as helpful)
Hi both,
thanks for reaching out!
You're absolutely right, you can use the single brackets to extract the second list. Hope this helps!
Best,
365 Eli