R Merge Dataframe -


i have multiple data frames have same column headers want append them 1 after other make 1 big dataframe. best way this.

i used following: not sure right way do:

append(x, y) 

i tried rbind ended following error expected since these data frames have different length in size:

error in names(value[[jj]])[ri] <- nm :    'names' attribute [2066] must same length vector [9] in addition: warning message: in names(value[[jj]])[ri] <- nm :   number of items replace not multiple of replacement length 

here example:

> x   user_id rev_page   rev_id rev_parent_id page_ns rev_length delta deleted rev_curr_minor           timestamp edit_count lang_level 1  705834  1048946 32026867      30924739       0       2959    82       0              0 2005-12-19 23:21:24          0          n 2  705834  1048946 32028621      32026867       0       3085   126       0              0 2005-12-19 23:36:33          1          n 3  705834    21402 32032828      32027632       0      14395   470       0              0 2005-12-20 00:10:06          2          n 4  705834    21402 32033273      32032828       0      14400     5       0              0 2005-12-20 00:13:50          3          n 5  705834   321528 32065506      29330826       0       3440   201       0              0 2005-12-20 05:13:45          4          n 6  705834   321528 32066086      32065506       0       3525    85       0              0 2005-12-20 05:21:25          5          n > y   user_id rev_page   rev_id rev_parent_id page_ns rev_length delta deleted rev_curr_minor           timestamp edit_count lang_level 1  892755  2585151 38515111      24830760       0       2018  1213       0              0 2006-02-06 21:32:26          0          1 2  892755  3807359 63798071      63471532       1      14047  5293       0              0 2006-07-14 15:46:56          1          1 3  892755  3807359 63798564      63798071       1      14146    99       0              0 2006-07-14 15:49:52          2          1 4  892755  2976438 63825832      44108751       0       9609   -60       0              0 2006-07-14 18:38:41          3          1 5  892755  3807359 63891769      63855569       1      15579  1005       0              0 2006-07-15 02:28:59          4          1 6  892755  3807359 67487579      63891769       1      15745   166       0              0 2006-08-03 18:52:01          5          1 > class(x) [1] "data.frame" > z <- rbind(x,y) error in names(value[[jj]])[ri] <- nm :    'names' attribute [12] must same length vector [9] in addition: warning messages: 1: in names(value[[jj]])[ri] <- nm :   number of items replace not multiple of replacement length 2: in names(value[[jj]])[ri] <- nm :   number of items replace not multiple of replacement length > rbind(x,y) 

if columns in same order (following @matthewplourde's comment), rbind(df1,df2,df3,...).


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -