Skip to content
Prev 26907 / 63434 Next

(PR#10500) Bug#454678: r-base-core: Crash when calling

I would say this was user error (insisting on editing non-existent 
rownames), although the argument is documented.  You could argue that 
there are implicit rownames, but they would be 1, 2 ... not row1, row2 
....  And rownames(mat) is NULL.

For an interactive function the best solution seems to be to throw an 
error when the user asks for the impossible.

I'll fix it for 2.7.0: it certainly isn't 'important' as it has gone 
undiscovered for many years, and edit.matrix is itself little used.


BTW, 1:dim(names)[1] is dangerous: it could be 1:0.  That was the 
motivation for seq_len.
On Fri, 7 Dec 2007, edd at debian.org wrote: