From bbo|ker @end|ng |rom gm@||@com  Wed Sep  9 04:04:44 2020
From: bbo|ker @end|ng |rom gm@||@com (Ben Bolker)
Date: Tue, 8 Sep 2020 22:04:44 -0400
Subject: [Rd] more Matrix weirdness
Message-ID: <fbaf45b7-b6d8-e93f-39d9-aa51d6f2c28e@gmail.com>

   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



[Rd] more Matrix weirdness
Ben Bolker