Consider:
> x <- array(1:12,dim=12)
> x[13]
[1] NA]
> m <- array(1:12,dim=c(3,4))
> m[3,5]
Error: subscript out of bounds
Can anyone tell me it there is a Good Reason for the difference in
behaviour
between 1 dimensional and higher dimensional arrays? In a bit of
code that
I was working on I expected the NA behaviour and didn't get it of
course. Then
I had to take evasive action to avoid the error.
Naive young thing that I am, I would prefer the NA behaviour to be
universal.
But I expect that, as usual, I'm overlooking something.
cheers,
Rolf Turner
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.