简体   繁体   English

如何在 Revolution R Enterprise 或 R Studio 中导入大型数据集?

[英]How to import Large Datasets in Revolution R Enterprise or R Studio?

I'm currently using Revolution R Enterprise Version 7.5 .我目前使用的是Revolution R Enterprise 版本 7.5

I am trying to import a dataset from Excel into RRE .我正在尝试将数据集从Excel 导入 RRE Here is my code:这是我的代码:

library("dplyr")
library("XLConnectJars")
library("XLConnect")

dataset1 <- readWorksheetFromFile(file.choose(), sheet=1, startRow=1, Header=T)

When I try to execute this block of code, this is the error I get:当我尝试执行这段代码时,这是我得到的错误:

Error: OutOfMemoryError (Java): GC overhead limit exceeded

Is there anyway to get large amounts of data into Revolution R Enterprise ?有没有办法将大量数据导入Revolution R Enterprise Maybe some RevoScaleR library function that I can use?也许我可以使用一些RevoScaleR库函数?

Even help in R Studio will do.甚至R Studio 中的帮助也可以。

Although I haven't used this particular package ( XLConnect ), the error you are getting is because it imports rJava .虽然我没有使用过这个特定的包 ( XLConnect ),但你得到的错误是因为它导入了rJava You need to change the allocated Java heap size using the following command:您需要使用以下命令更改分配的 Java 堆大小:

options(java.parameters="-Xmx4g")

That will change it from the default of 512MB to 4GB;这会将其从默认的 512MB 更改为 4GB; you can choose a different value if you like.如果您愿意,您可以选择不同的值。

You need to run that command BEFORE you load the libraries.您需要在加载库之前运行该命令。 If I were you, I would restart your R session, run that command, and then proceed.如果我是你,我会重新启动你的 R 会话,运行该命令,然后继续。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM