[Rd] more Matrix weirdness

Ben Bolker
2020-09-09T02:04:44Z

Am I being too optimistic in expecting this (mixing and matching
matrices and Matrices) to work?  If x is a matrix and m is a Matrix,
replacing a commensurately sized sub-matrix of x with m throws "number
of items to replace is not a multiple of replacement length" ...

x <- matrix(0,nrow=3,ncol=10, dimnames=list(letters[1:3],LETTERS[1:10]))
rr <- c("a","b","c")
cc <- c("B","C","E")
m <- Matrix(matrix(1:9,3,3))
x[rr,cc] <- m

    cheers
     Ben Bolker