The data frame are not having same number of rows. The datasets are uneven So how to add the data frame horizontally in separate column of single sheets?
Below is the code I am using to write separate data frame for sample data
files <- list.files(pattern= '*.shp')
a<- read_sf("fire_archive_M6_139248.shp")
b<- read_sf("fire_nrt_M6_139248.shp")
aa = as.data.frame(a$ACQ_DATE)
bb = as.data.frame(b$ACQ_DATE)
cc = as.data.frame(c$ACQ_DATE)
library("writexl")
setwd("D:/fire_work_cov/test3/csv")
write_xlsx(aa,"2020a.xlsx")
write_xlsx(bb,"2020b.xlsx")
write_xlsx(cc,"2019.xlsx")
Below is the head of aa and bb (the length of full head is different for each data)
> head(aa)
a$ACQ_DATE
1 2020-03-02
2 2020-03-02
3 2020-03-02
4 2020-03-02
5 2020-03-02
6 2020-03-03
> bb = as.data.frame(b$ACQ_DATE)
> head(bb)
b$ACQ_DATE
1 2020-04-01
2 2020-04-01
3 2020-04-01
4 2020-04-01
5 2020-04-01
6 2020-04-01
> head(cc)
c$ACQ_DATE
1 2019-03-01
2 2019-03-01
3 2019-03-01
4 2019-03-01
5 2019-03-02
6 2019-03-02