Re: [Rd] subsetting matrix by subscript=0,x silently skips.

2007-01-18 Thread Tony Plate
Hin-Tak Leung wrote: > (I have taken off r-bug@, as multiple e-mails hitting r-bug@ probably > will result in multiple bug reports, knowing most mail server will > retry) > > Tony Plate wrote: > >> The help page for "[" says: >> >> A third form of indexing is via a numeric matrix with the one co

Re: [Rd] subsetting matrix by subscript=0,x silently skips.

2007-01-18 Thread Hin-Tak Leung
(I have taken off r-bug@, as multiple e-mails hitting r-bug@ probably will result in multiple bug reports, knowing most mail server will retry) Tony Plate wrote: > The help page for "[" says: > > A third form of indexing is via a numeric matrix with the one column for > each dimension: each row

Re: [Rd] subsetting matrix by subscript=0,x silently skips.

2007-01-18 Thread Peter Dalgaard
Hin-Tak Leung wrote: > (e-mailing to R-bugs is intentional - the web itnerface seems to > be down) > So is the mail interface... I have alerted our support people, but I didn't see the problem until I came back from teaching, so they may not get it fixed before tomorrow. -- O__ Peter

Re: [Rd] subsetting matrix by subscript=0,x silently skips.

2007-01-18 Thread Tony Plate
The help page for "[" says: A third form of indexing is via a numeric matrix with the one column for each dimension: each row of the index matrix then selects a single element of the array, and the result is a vector. Negative indices are not allowed in the index matrix. NA and zero values are

[Rd] subsetting matrix by subscript=0,x silently skips.

2007-01-18 Thread Hin-Tak Leung
(e-mailing to R-bugs is intentional - the web itnerface seems to be down) > a<- cbind(c(1,2), c(3,4)) > a [,1] [,2] [1,]13 [2,]24 > a[cbind(c(2,2), c(2,1))] [1] 4 2 > a[cbind(c(2,3), c(2,1))] Error: subscript out of bounds > a[cbind(c(2,-1), c(2,1))] Error: negative val