RCall.jl icon indicating copy to clipboard operation
RCall.jl copied to clipboard

Error thrown by R function write.xlsx {xlsx}

Open giannilmbd opened this issue 8 years ago • 5 comments

Hi, There seem to be a problem trying to write an xlsx file using "write.xlsx".

Here is what happens ` using RCall

R"library('xlsx')" RCall.jl: Loading required package: rJava

R"write.xlsx(1,'test.xlsx')" RCall.jl: Error in write.xlsx(1, "test.xlsx") : `

Same error if I try to write a dataframe object (instead of a simple number)

Also, it doesn't really seem that the library has been loaded R"?write.xlsx" RCall.RObject{RCall.StrSxp} No documentation for ‘write.xlsx’ in specified packages and libraries: you could try ‘??write.xlsx’

Best, Gianni

giannilmbd avatar Aug 16 '17 06:08 giannilmbd

Did you install xlsx properly? Are there error messages when the package xlsx is loaded? For some unknown reasons, I got segfault when it was loaded

R> library('xlsx')

signal (11): Segmentation fault: 11
while loading no file, in expression starting on line 0
unknown function (ip: 0x128a5b2b3)
Allocations: 7707900 (Pool: 7706482; Big: 1418); GC: 9
Loading required package: rJava
Loading required package: xlsxjars

randy3k avatar Aug 21 '17 20:08 randy3k

No error messages by loading. Within R it works properly.

library('xlsx') Loading required package: rJava Loading required package: xlsxjars

On Mon, Aug 21, 2017 at 10:22 PM, Randy Lai [email protected] wrote:

Did you install xlsx properly? Are there error messages when the package xlsx is loaded? For some unknown reasons, I got segfault when it was loaded

R> library('xlsx')

signal (11): Segmentation fault: 11 while loading no file, in expression starting on line 0 unknown function (ip: 0x128a5b2b3) Allocations: 7707900 (Pool: 7706482; Big: 1418); GC: 9 Loading required package: rJava Loading required package: xlsxjars

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JuliaInterop/RCall.jl/issues/200#issuecomment-323843217, or mute the thread https://github.com/notifications/unsubscribe-auth/Addw7_TFzbKcfgCXbQ42M8AKaKfI9lFhks5saecYgaJpZM4O4f8W .

giannilmbd avatar Aug 21 '17 20:08 giannilmbd

May be instead of xlsx, you should try openxlsx. It is much lightweight and it runs faster.

randy3k avatar Aug 21 '17 21:08 randy3k

I suspect that xlsx has some PATH issues when it is loaded by Julia. It may be hard to figure out what the exact cause is.

randy3k avatar Aug 21 '17 21:08 randy3k

Thanks. Sounds good. I'll try that! Cheers

On Mon, 21 Aug 2017 at 23:24, Randy Lai [email protected] wrote:

I suspect that xlsx has some PATH issue when it is loaded by Julia. It may be hard to figure out what the exact cause is.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JuliaInterop/RCall.jl/issues/200#issuecomment-323856951, or mute the thread https://github.com/notifications/unsubscribe-auth/Addw7wyDHm76D35Be2GTdfRrKMEu4RXDks5safWbgaJpZM4O4f8W .

giannilmbd avatar Aug 22 '17 04:08 giannilmbd