Skip to content
Prev 397182 / 398500 Next

Undocumented behaviour of diag when replacing the diagonal of a matrix?

On 2024-12-04 7:38 a.m., Gerrit Eichner wrote:
Could you show us the log of what you did that generated errors?  The 
statement `diag(A[-1, ]) <- 2` is pretty complex; it involves two 
assignment functions (both `diag<-` and `[<-`), so you might have tried 
to execute the wrong thing.

Duncan Murdoch