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

package 'stats' in options("defaultPackages") was not found

Open anayana opened this issue 9 months ago • 2 comments

Hey,

trying to use RCall I get stuck an already reported problem:

julia> using RCall
┌ Warning: RCall.jl: During startup - Warning message:
│ package 'stats' in options("defaultPackages") was not found
└ @ RCall C:\Users\abc\.julia\packages\RCall\0ggIQ\src\io.jl:172

Eventhough I found some discussions on that issue, I was not able to fix it.

  • julia, R and RTools were updated.
julia> versioninfo()
Julia Version 1.11.3
Commit d63adeda50 (2025-01-21 19:42 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)


R> version
               _                                
platform       x86_64-w64-mingw32               
arch           x86_64                           
os             mingw32                          
crt            ucrt                             
system         x86_64, mingw32                  
status                                          
major          4                                
minor          4.2                              
year           2024                             
month          10                               
day            31                               
svn rev        87279                            
language       R                                
version.string R version 4.4.2 (2024-10-31 ucrt)
nickname       Pile of Leaves   

  • environmental variables were set

julia> ENV["RTOOLS44_HOME"] = raw"C:\rtools44\usr\bin"
"C:\\rtools44\\usr\\bin"

julia> ENV["R_HOME"] = raw"C:\Program Files\R\R-4.4.2"
"C:\\Program Files\\R\\R-4.4.2"

  • some other approaches mentioned in the other discussions on that issue were tried.

My first idea was that julia might not access the correct R library, as there are 2 R libraries on my system, however the path to the library seem to be correct. In both libraries stats.dll file exists.

Does anybody has a hint how the problem could be fixed?

anayana avatar Mar 06 '25 15:03 anayana

In terms only of trying different approaches, you could give specifying the path to the R environment through the preferences system a try.

frankier avatar Mar 22 '25 11:03 frankier

I wonder if this is a BLAS issue -- it seems that BLAS loading issues can lead to errors with loading `stats. xref

palday avatar Apr 22 '25 18:04 palday