Hi> > Hello, > > I have a matrix of 17 rows and 20 columns. I want to replicate this matrix > 20 times, but I only want to replicate the rows. How do I do that?
Replicate index. x<-matrix(1:4, 2,2) x[rep(1:2, 20),] Regards Petr > > Kind regards / Met vriendelijke groet / Med venlig hilsen, > > Dr. Gijs Schumacher > Postdoctoral Researcher > Department of Political Science and Public Management, University of > Southern Denmark & > Department of Political Science, VU University Amsterdam > > Email: g...@sam.sdu.dk<mailto:g...@sam.sdu.dk>; g.schumac...@vu.nl< > mailto:g.schumac...@fsw.vu.nl> > Web: http://www.gijsschumacher.nl<http://www.gijsschumacher.nl/> > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. ______________________________________________ R-help@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.