Re: [R] dataframe rbind

2015-12-04 Thread Troels Ring
Thanks a lot - I should have seen that Best wishes Troels Den 04-12-2015 kl. 17:09 skrev PIKAL Petr: Hi Maybe little bit of studying how functions work can be useful rbind uses to bind two objects together, however you give it only one. Use DF <- rbind(DF, data.frame(a=rnorm(10),b=runif(10),

Re: [R] dataframe rbind

2015-12-04 Thread peter dalgaard
On 04 Dec 2015, at 17:03 , Troels Ring 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

Re: [R] dataframe rbind

2015-12-04 Thread Bert Gunter
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

Re: [R] dataframe rbind

2015-12-04 Thread David L Carlson
This will work, although depending on what you are trying to do, there may be a better way: > DF <- data.frame(a=rnorm(10),b=runif(10),ID=0) > for (i in 1:10){ + DF <- rbind(DF, data.frame(a=rnorm(10),b=runif(10),ID=i))} > str(DF) 'data.frame': 110 obs. of 3 variables: $ a : num 0.792 0.141

Re: [R] dataframe rbind

2015-12-04 Thread PIKAL Petr
Hi Maybe little bit of studying how functions work can be useful rbind uses to bind two objects together, however you give it only one. Use DF <- rbind(DF, data.frame(a=rnorm(10),b=runif(10),ID=i)) instead. Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-pro