Displaying 3 results from an estimated 3 matches for "write_xlsx".
Did you mean:
write2xls
2018 May 25
2
how to make the code more efficient using lapply
...mp))) # change the
dataframe to list, so it can be append to list.
if (i == list.files()[length(list.files())]){ # if it is last excel file,
then combine all the rows in the list into a dataframe because they all
have same column names
temp.df.all<-do.call("rbind",temp.df)
write_xlsx(temp.df.all, path="output.xlsx") # write_xlsx from package
writexl.
}
}
*Stephen*
[[alternative HTML version deleted]]
2018 May 25
0
how to make the code more efficient using lapply
...n,sheet=1,range=cell_cols(c(1,30,38:42)))
temp<-temp[temp$Id %in% c("geneA","geneB","geneC"),]
}
myL <- lapply( X=list.files(), FUN=f )
temp.df.all<-do.call("rbind",myL)
names(temp.df.all)<-gsub("^.*] ","",names(temp.df.all))
write_xlsx(temp.df.all, path="output.xlsx")
HTH,
Eric
On Fri, May 25, 2018 at 9:24 AM, Stephen HonKit Wong <stephen66 at gmail.com>
wrote:
> Dear All,
>
> I have a following for-loop code which is basically intended to read in
> many excel files (each file has many columns an...
2018 May 25
1
how to make the code more efficient using lapply
...s(c(1,30,38:42)))
temp<-temp[temp$Id %in% c("geneA","geneB","geneC"),]
}
myL <- lapply( X=list.files(), FUN=f )
temp.df.all<-do.call("rbind",myL)
names(temp.df.all)<-gsub("^.*] ","",names(temp.df.all))
write_xlsx(temp.df.all, path="output.xlsx")
HTH,
Eric
On Fri, May 25, 2018 at 9:24 AM, Stephen HonKit Wong <stephen66 at gmail.com>
wrote:
> Dear All,
>
> I have a following for-loop code which is basically intended to read in...