I get what I initially thought was unexpected behaviour from:

x <- tapply(runif(100), sample(5, 100, TRUE), mean)
solve(Diagonal(5), x)
# Error: not-yet-implemented method for solve(<ddiMatrix>, <array>).
#  ->>  Ask the package authors to implement the missing feature.

This is because x is a 1-D array, so the operation is not
well-defined. Would it make sense for Matrix to support this (treat
1-D arrays as column vectors, as it does for plain vectors)? Or should
I make my intent clear with

solve(Diagonal(5), as.vector(x))

?

-Deepayan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to