rjags installed on windows, but can't be loaded

431 Views Asked by At

I'm trying to use rjags (version 4.6) on R (version 5.1.2) with JAGS (version 4.2.0, installed with JAGS-4.2.0-Rtools33.exe). I have Windows 10 Entreprise 2016 LTSB.

JAGS and rjags were installed without any error message.

install.packages("rjags", dependencies = TRUE)

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rjags_4-6.zip'
Content type 'application/zip' length 620417 bytes (605 KB)
downloaded 605 KB
package ‘rjags’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
    C:\Users\Océane\AppData\Local\Temp\RtmpSMXwHd\downloaded_packages

But when I try to do library(rjags) (or library("rjags")), I get the following error message :

Error: package or namespace load failed for ‘rjags’:
 .onLoad a échoué dans loadNamespace() pour 'rjags', détails :
  appel : dir.exists(x)
  erreur : file name conversion problem -- name too long?

All the other packages I have installed can be correctly loaded. I see rjags installed at the same location of the other libraries (C:\Users\Océane\Documents\R\win-library\3.5\rjags), and it is in the list returned in R by installed.packages().

When I install the same softwares and versions (R, JAGS and rjags) on a friend's windows 10 computer, I don't have the problem, rjags is loaded and linked to JAGS.

Does anyone knows what is the problem and how to solve it?

Thanks a lot!

0

There are 0 best solutions below