Why is this a bug ? help(diag) says
If 'x' is a vector (or 1D array) of length two or more, then
'diag(x)' returns a diagonal matrix whose diagonal is 'x'.
If 'x' is a vector of length one then 'diag(x)' returns an
identity matrix of order the nearest integer to 'x'. The
On Wednesday, September 17, 2003, at 06:51 PM, Marsland, John wrote:
It concerns trival diagonal matrices:
[...]
diag(rnorm(1))
0 x 0 matrix
diag(rnorm(1),nrow=1)
[,1]
[1,] 0.4843697
There's an obvious work around... but I thought it was worth notifying
the
list.
I fail to see any