Open e-clin opened 1 year ago
Yeah, this sounds like an issue with RAM.
I thought we had some docs on this, but apparently not. You have to modify the setup for the JVM before it is started (i.e. before you load any packages, because many packages will start the JVM).
options(java.parameters = "-Xmx8000m")
I tried to use the purrr and xlsx packages together to read multiple password-protected .xlsx files in a folder into a nested data frame. Each file has multiple sheets. I plan to:
purrr::map_chr()
andxlsx::getSheets()
to get the names of the sheets in each file in a "sheets" column.purrr::map()
andpurrr::map_dfr()
to applyxlsx::read.xlsx()
to every cell in the "file" column and every cell in the "sheets" column to read all sheets in a file and row-bind them into a data frame into a "data" column.My code is as follows:
Somehow this code only ran once. When I tried to add the
names()
line to extract the list names (the sheet names) from the Java objects in the "sheets" column, I encountered the following error:The Traceback seemed to suggest that there was some overhead limit exceedance error:
Even if I removed the newly added
names()
line didn't help. I had to restart the R session to be able to rerun the code.I also had this problem before with
xlsx::read.xlsx()
, when I was experimenting with my code. Once the above error occurred, even previously working code ran into this problem. Again, I had to restart the R session to be able to rerun the code.Was it just me doing something wrong?