Ng Stanley
2008-Apr-19 01:21 UTC
[R] How to insert a vector or matrix into an existing matrix
Hi, Is there any functions to insert a vector or matrix into an existing matrix say between row 5 and 6 or column 8 and 9, without creating a temporary matrix ? Thanks Stanley [[alternative HTML version deleted]]
Henrique Dallazuanna
2008-Apr-20 13:21 UTC
[R] How to insert a vector or matrix into an existing matrix
If I understand: m <- matrix(sample(10*10), ncol=10) m[5:6, 8:9] <- 1:4 On 4/18/08, Ng Stanley <stanleyngkl at gmail.com> wrote:> Hi, > > Is there any functions to insert a vector or matrix into an existing matrix > say between row 5 and 6 or column 8 and 9, without creating a temporary > matrix ? > > Thanks > Stanley > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > 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. >-- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O