Re: [R] Repeat dataframe

From: Kenneth Cabrera <>
Date: Tue 02 May 2006 - 02:46:12 EST

Well, I find a solution!

If DFe is a data frame and n is an integer then

DFr<-data.frame(t(matrix(rep(t(DFe),n),dim(DFe)[2],dim(DFe)[1]*n))) names(DFr)<-names(DFe)

Will work!!

Maybe somebody has a more elegant solution.

Again, thank you for your help.

On Mon, 01 May 2006 11:23:14 -0500, Kenneth Cabrera <> wrote:

> Hi R list:
> How can I "repeat" a data frame n times (with n>1000),
> and obtain a new data frame where all the n data frames
> are binded by rows?
> Thank you for your help
> Kenneth

Using Opera's revolutionary e-mail client:

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Tue May 02 03:01:27 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 02 May 2006 - 04:10:01 EST.

Mailing list information is available at Please read the posting guide before posting to the list.