3-02-2012, 11:26 (+0000); Schumacher, G. escriu:
> 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?

If x is your matrix, this

x[rep(1:17, 20),]

will give you a matrix with 340 rows and 20 columns which I think is
what you want.

Cheers,
Ernest

______________________________________________
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.

Reply via email to