From bibiko at eva.mpg.de  Mon Dec 19 10:48:03 2011
From: bibiko at eva.mpg.de (=?iso-8859-1?Q?Hans-J=F6rg_Bibiko?=)
Date: Mon, 19 Dec 2011 10:48:03 +0100
Subject: [Rd] Possible bug in edit(x) for editing matrices [tested on a Mac]
Message-ID: <2749EBD6-2786-4E5C-BC58-7B8AE4177AE4@eva.mpg.de>

Hi,

it seems there's a possible bug in edit(x) if x is a matrix filled with NA only.

To reproduce please do the following:

a <- matrix()
edit(a)

change e.g. the cell value to 1 and close the GUI-based editor. edit(a) returns NA. This also happens for any dimension of the matrix as long as all cell values are NA. If at least one of the cell values is not NA it works correctly. The same behaviour I also get via "fix(x)".

I tried this by using R via the Terminal (editing via X11 and Tcl/Tk) and the Mac R-GUI app.

Here's my sessionInfo():

R version 2.14.0 (2011-10-31)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     


Any ideas? Or is this an undocumented behaviour?

Best,
--Hans



[Rd] Possible bug in edit(x) for editing matrices [tested on a Mac]
=?iso-8859-1?Q?Hans-J=F6rg_Bibiko?=