I have seven data.frame
s named STEP1.df
, STEP2.df
,......,STEP7.df
.
Each dataframe has two columns, one is a numeric and another is of Date.Time format. These data.frame
s have 44 rows. I am trying to make a single data.frame
by binding them together.
The way I tried are:
do.call("rbind", list(STEP1.df, STEP2.df, STEP3.df, STEP4.df, STEP5.df, STEP6.df,STEP7.df))
bind_rows (list(STEP1.df, STEP2.df, STEP3.df, STEP4.df, STEP5.df, STEP6.df,STEP7.df)
The issue is that above code creates 14 columns (2 for each data.frame
s) and puts
first data.frame
STEP1.df in Column 1 and 2 / Row 1 to 44,
second data.frame
STEP2.df in Column 3 and 4 / Row 45 to 88
...
and so on.
The way I wanted was to put all in just two columns A and B with STEP1.df spanning from Row 1 to 44, STEP2.df in Column A and B in Row 45 to 88 and so on...