You can use bind_cols()
from dplyr
package to add the date
column as the first column in csmib_lag1
.
Assuming that both csmib
and csmib_lag1
have a column named date
that contains the same dates in the same order:
main.r360 chars19 lines
Output:
main.r193 chars9 lines
Here, the bind_cols()
function adds the date
column as the first column of csmib_lag1
.
gistlibby LogSnag