Duncan Murdoch wrote: > On 10/2/2006 3:21 PM, Herve Pages wrote: >>> a[[x=1]] >> Error in a[[x = 1]] : subscript out of bounds >> > > Indexing is a function call, with arguments x, i, j, ... . If you use > y=1, you're setting something in the "..." part of the arg list. If > you say x=1, you're setting the first arg, but because a[[x=1]] is the > same as "[["(a, x=1), it is going to evaluate it as "[["(x=1, i=a) and > try to index 1 by a instead of a by 1. Hi Duncan,
Right, thanks for the explanation and sorry for not paying more attention. Best, H. ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel