Re: [R] Matrix::bdiag doesn't like being given a single named argument

2019-05-31 Thread Jeff Newmiller
My take would be that there is no reason to specify argument names at all when calling bdiag, and clearly there is a reason to not do so. The error seems to arise from using the S3 method is.list, which allows your final example to work. is.list(a=1) clearly fails to match the x argument, but i

[R] Matrix::bdiag doesn't like being given a single named argument

2019-05-31 Thread Benjamin Tyner
Hello, Perhaps not a bug, but interesting because the error only happens when there is a single named argument.    > m <- matrix(1, 1, 1)    > library(Matrix)    > bdiag(m)    1 x 1 sparse Matrix of class "dgCMatrix"    [1,] 1    > bdiag(a = m)    Error in is.list(...) : supplied argument nam