I know this is a newbie question, but I am trying to understand the difference between the [[ ]] and $ in accessing elements in a list. Are there special cases where I have advantages to use one over the other?
I think to understand that you can use [[ to select any single element and the returned object will be determined by the type of the element, whereas [ returns a list object of the selected element or even a list with multiple elements. On the other hand when using $ to reference an element in a list the returned type is not a list but the actual value.
Is this korrect? Are there any occasions where I must use [[ ]] or $?
Thank you for any help.