Skip to content
Prev 167660 / 398502 Next

Odd behaviour of subset indexing (x:y).

on 01/20/2009 05:01 PM John Sorkin wrote:
Operator precedence.

Note:

# You are asking for indices 3:6 and of course x[6] does not exist
# hence the NA
# Equivalent to: iS + (1:iE)
[1] 3 4 5 6


# This is what you want
[1] 3 4


HTH,

Marc Schwartz