On 7 December 2007 at 17:30, goodrich at fas.harvard.edu wrote:
| [I was overlooked on the CC. Hopefully this message does not create a
| new bug report.]
[ That was my bad, but I did sent you a forwarded copy a few hours ago when I
noticed this. ]
| > Prof Brian Ripley wrote:
| > 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.
|
| I would agree that it is a rare user error, but my original mistake was
| a little more benign than the one that is depicted in the bug report. I
| just forgot to call rownames()<- before calling edit(); that could have
| happened to anyone. Perhaps one reason why this issue has not been
| reported before is that in 2.5.1 at least, it produces an error message
| rather than crashing (which I noted in the original bug report to Debian
| but that was a little hard to see by the time it got forwarded to
| R-bugs). In some ways, I think throwing an error in 2.7.0 would be
| better than the behavior of edit.data.frame() in this case, which is to
| add row names of 1, 2, ... . -- Thanks, Ben
Having first provided a (rough) patch, and havuing had some more time to
ponder the issue, I have decided to call it a non-bug as far as Debian is
concerned (and you even commented that it belonged more into R's BTS). This
message closes the bug report there.
I am also with Brian on the issue at large -- it is a user error as you do
have to force the TRUE state leading to the segfault.
Anyway, a sufficient amount of time has now been spent with the upshot that
it will behave better in the corner case once 2.7.0 is out. Sounds good to
me.
Thanks to Brian Ripley for the follow-up on R Core's behalf, and thanks to
Ben to report the, err, 'issue'.
Cheers, Dirk
--
Three out of two people have difficulties with fractions.