Seconded!
On March 29, 2019 11:33:01 AM PDT, Rui Barradas wrote:
>Hello,
>
>I recommend you save them all in a list. It's a much better idea than
>to
>have length(names(wb)) objects in the globalenv.
>Something like the following would read them all in one go.
>
>xls_list <- lapply(seq_along(nam
Hello,
I recommend you save them all in a list. It's a much better idea than to
have length(names(wb)) objects in the globalenv.
Something like the following would read them all in one go.
xls_list <- lapply(seq_along(names(wb))[-1], function(i){
read.xlsx(wb, sheet = i)
})
names(xls_list
I think you want ?assign
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, Mar 29, 2019 at 10:39 AM Assa Yeroslaviz wrote:
> I am trying to automate the w
On Fri, 29 Mar 2019 14:07:16 +0100
Assa Yeroslaviz wrote:
> Is there a way to read for each sheet the name from names(wb) and
> convert it to a name for the object?
See `get` and `assign` functions for a way to use strings as object
names. Generally, it might not be a good idea to do that (what
I am trying to automate the way i read my tables. I have an Excel sheet I'm
reading using openxlsx package. The sheet contains over 30 sheets, i would
like to save each of them as separate objects.
my workflow for now is as such:
wb <- loadWorkbook(xlsxFile = "Output/Up_Down_Regulated_Gene_Lists.
5 matches
Mail list logo