I have different data.frames
of 1 row that I would like to join to form one big data.frame
. The thing is that I want my colnames
to go from jan 2002
to dic 2011
, and fill these columns with my data frames
even if for one column there is no value. Examples on data.frames (There can be with "discrete" dates):
df1:
ene 2002 ene 2002 feb 2002 feb 2002 mar 2002 mar 2002
69 MA 38 MA 38 MA
df2:
ago 2004 ago 2004 sep 2004 sep 2004 oct 2004 oct 2004
114 MB 102 MB 49 M
df3:
oct 2011 oct 2011 nov 2011 nov 2011 dic 2011 dic 2011
10 A 9 A 20 MA
df4("Discrete data.frame"):
jan 2008 jan 2008 jul 2009 jul 2009 dic 2010 dic 2010
20 MA 200 B 100 MB
Data.frame wanted (desire Output):
ene 2002 ene 2002 feb 2002 feb 2002 mar 2002 mar 2002...ago 2004 ago 2004 sep 2004 sep 2004 oct 2004 oct 2004...jan 2008 jan 2008...jul 2009 jul 2009...dic 2010 dic 2010... oct 2011 oct 2011 nov 2011 nov 2011 dic 2011 dic 2011
69 MA 38 MA 38 MA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA 114 MB 102 MB 49 M NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 10 A 9 A 20 MA
NA NA NA NA NA NA NA NA NA NA NA NA 20 MA 200 B 100 MB NA NA NA NA NA NA
In this example all other columns with no value would be NA
: For example ene 2003 feb 2003 ..... nov 2005 dic 2005 ...... all month in year 2006 or 2007 ( Just saying random month that were not in the example but I want them to appear in my output)