将大的多个Excel文件读入R时出错

时间:2019-07-09 20:18:24

标签: r

我正在尝试将多个文件导入R,我尝试的前几个文件大约为50KB,但效果很好,但是在尝试500KB文件时,我仍然遇到以下错误

尝试使用64位R,也增加了Java内存

for (i in 1:length(RMLD_March)){
  RMarch= loadWorkbook(RMLD_March[i])
  RMarchSheets= getSheets(RMarch)

for (j in 1:length(RMarchSheets)){
   RMarchData= read.xlsx(RMLD_March[i], sheetIndex = j,
                         sheetName =  "Net Load Obligation", 
                         colIndex =  c(2:9),
                         startRow = 5, endRow = 28,
                         as.data.frame = TRUE, header = F)

      if (i==1&j==1 ) RMarchData1 = RMarchData else RMarchData1=rbind(RMarchData1,RMarchData)
}}
  

.jcall(“ RJavaTools”,“ Ljava / lang / Object;”,“ invokeMethod”,cl,中的错误:     org.apache.poi.POIXMLException:java.lang.reflect.InvocationTargetException

0 个答案:

没有答案