Skip to content
Prev 32622 / 63424 Next

diag() has a bug (PR#13702)

Full_Name: Michael Spiegel
Version: 2.9.0
OS: linux
Submission from: (NULL) (204.111.252.142)


The diag() function appears to reject the first argument when it is a matrix,
and nrow and ncol arguments are also provided.
[,1] [,2]
[1,]    1    3
[2,]    2    4
[1] 1 4
Error in diag(foo, 2, 2) : first argument is array, but not matrix.
[1] TRUE