[Rd] Possible bug in edit(x) for editing matrices [tested on a Mac]
bibiko at eva.mpg.de
Mon Dec 19 12:43:01 CET 2011
On 19 Dec 2011, at 12:22, Prof Brian Ripley wrote:
>> it seems there's a possible bug in edit(x) if x is a matrix filled with NA only.
> It's as documented. Hint: look at mode(a) or str(a), and check what values are accepted for a logical matrix.
Thank you very much! I wasn't aware of the circumstance that mode(matrix()) of course returns 'logical'. Maybe one could warn the user in the function "edit(x)" that if (is.matrix(x) && is.logical(x) == TRUE) that edit(x) doesn't work since my workaround was that I created a matrix of the dimension 10x20 via matrix(NA, nrow=10, ncol=20) and used the GUI data editor to fill the matrix's cells with values.
More information about the R-devel