Re: [R] about combining two dataframes

2017-05-24 Thread Bert Gunter
21 52 27 >> >> The attached .png image file shows you how to send plain text emails to >> r-help using gmail. >> >> - >> David L Carlson >> Department of Anthropology >> Texas A University >> College S

Re: [R] about combining two dataframes

2017-05-24 Thread lily li
r-help using gmail. > > - > David L Carlson > Department of Anthropology > Texas A University > College Station, TX 77840-4352 > > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of lily li

Re: [R] about combining two dataframes

2017-05-24 Thread lily li
Thanks for your reply. I created the two dataframes (just numbers from txt files) in one for loop, so that it is confused to give them the same column names. That is the reason that I give them different column names to differentiate them, but it causes difficulty in later combining them. On

Re: [R] about combining two dataframes

2017-05-24 Thread Ulrik Stervbo
Hi Lily, maybe you should read up on what bind_rows/bind_cols (or the base functions rbind and cbind) do. bind_cols and cbind will fail in this case because of the different number of rows. bind_rows and rbind will fail because the column names are different - how can R know that month and mon

Re: [R] about combining two dataframes

2017-05-24 Thread David L Carlson
arlson Department of Anthropology Texas A University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of lily li Sent: Wednesday, May 24, 2017 12:30 PM To: R mailing list <r-help@r-project.org> Subject: [R] about combining two dat

[R] about combining two dataframes

2017-05-24 Thread lily li
Hi all, I have a question about combining two data frames. For example, there are the two dataframes below, with the same structure but different column names and column lengths. How to add the values in DF2 to the end of DF1, though the column names do not match? How to add more than two?