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
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
Hello,
Inline.
Às 10:06 de 31/05/19, Rui Barradas escreveu:
Hello,
Your foo.default is wrong in:
1) The general principle. S3 methods dispatch on the class attribute,
you cannot expect to set that attribute in foo.default
and have it call/dispatch
and have it call/dispatch
and ...
Hello,
Your foo.default is wrong in:
1) The general principle. S3 methods dispatch on the class attribute,
you cannot expect to set that attribute in foo.default
and have it call/dispatch
and have it call/dispatch
and ...
2) Even if this were possible, your assignment of the class attribu
4 matches
Mail list logo