Skip to content
Prev 156839 / 398503 Next

Error: subscript out of bounds.

There is a good reason for the error in the
matrix case.  Consider what would need to
happen for:

m[3, 5] <- 100

to work.

Consistency might be a good thing here, but
if so I think it should be an error for the 1-D
case.  This might be a useful difference between
1-D arrays and vectors.  However, it isn't clear
(to me at least) what such a change would break.


Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")
Rolf Turner wrote: