Dear Agony you did not place a "subject" on your message. That prevents
people to help you. So I have corrected.

About your problem. This seems to be related to memory allocated to Java
Virtual Machine on rJava and has been comment online many times (eg:
http://stackoverflow.com/questions/7963393/out-of-memory-error-java-when-using-r-and-xlconnect-package
).

Just do this before the library:
options(java.parameters = "-Xmx1024m")
library(rJava)
library(xlsx)


Caveman





On Tue, Mar 4, 2014 at 10:41 PM, Agony <agony_jah@yahoo.com> wrote:

> Dear all,
> I have a problem reading xlsx files in R.
> Could anybody help me how to resolve the problem?
>
>
> install.packages("xlsx", dependencies=TRUE)
> library(xlsx)
> library(rJava)
>
> data <- read.xlsx("3.1.xlsx", sheetIndex = 3.1)
> data <- read.xlsx("3.1.xlsx", sheetName= "a",as.data.frame=TRUE,
> header=TRUE)
> data <- read.xlsx("3.1.xlsx", 1)
>
> the error message is :
>
>
> Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  :
>   java.lang.OutOfMemoryError: GC overhead limit exceeded
>
>
> I also have problem in reading Rmpi library.
> I installed it correctly however when I read it by library(Rmpi) I
> received an error message:
> Error : .onLoad failed in loadNamespace() for 'Rmpi', details:
>   call: inDL(x, as.logical(local), as.logical(now), ...)
>   error: unable to load shared object
> 'C:/Users/Amir/Documents/R/win-library/3.0/Rmpi/libs/x64/Rmpi.dll':
>   LoadLibrary failure:  The specified module could not be found.
>
> Error: package or namespace load failed for 'Rmpi'
>
>
>
> My many many thanks your help in advance.
> Best,
> Amir
>         [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>

	[[alternative HTML version deleted]]

