Skip to content
Prev 169134 / 398506 Next

Difference between a[[i]] and a[i]

I think the thing that escaped me for quite a while was tracking down 
the syntax to specify elements of a list element:


x[[5]][3:7]  to get items from within the 5th element of x.


Seems IIRC there are some types of variables for which the form

x$thing[3:7]  fails and others for which it works fine (where the fifth 
element of x is named 'thing').  But I might be dreaming.

Carl