Hi there,
I have a question on manipulating a matrix. Say I have a matrix A
with 3 rows. I want to generate a new matrix B with 3 duplicates of
the first row of A, 2 duplicates of the second row, and 4 duplicates
of the third row. So B is a matrix with 9 rows. Or more general, I
want to generate (3, 2, 4, 5) duplicates of rows 1-4 of a matrix with
4 rows. Is there a simple function to do it? Thanks a lot!
Lei
______________________________________________
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.