[R] dataframe rbind

Bert Gunter bgunter.4567 at gmail.com
Fri Dec 4 17:12:08 CET 2015


Try reading and following the Help file, ?rbind.data.frame.

You are inventing your own syntax, not using R's.

Incidentally, growing the frames as you do is generally a bad idea.
Search r-help archives for why.

Cheers,
Bert

Bert Gunter

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
   -- Clifford Stoll


On Fri, Dec 4, 2015 at 8:03 AM, Troels Ring <tring at gvdnet.dk> wrote:
> Dear friends - I have a very simple question -
> I generate a number of dataframes with identical names and want to combine
> them into one large dataframe with the same names -
> here is an example
>
> DF <- data.frame(a=rnorm(10),b=runif(10),ID=0)
> for (i in 1:10){
> DF <- DF+rbind(data.frame(a=rnorm(10),b=runif(10),ID=i))}
>
> - the dataframe do not grow as I thought it would.
>
> How would I do this?
>
> All best wishes
> Troels Ring
> Nephrology
> Aalborg
> Denmark
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.



More information about the R-help mailing list