R-INLA Installing in Rstudio

1,373 views
Skip to first unread message

Ali Mansour

unread,
May 7, 2016, 6:19:15 AM5/7/16
to R-inla discussion group
Hello
I faced the following problem in installing R-INLA in Rstudio

> install.packages("INLA", repos="https://www.math.ntnu.no/inla/R/stable")
Installing package into ‘C:/Users/Ali/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
Content type 'application/zip' length 72912500 bytes (69.5 Mb)
opened URL
downloaded 69.5 Mb

Warning in install.packages :
  unable to move temporary installation ‘C:\Users\Ali\Documents\R\win-library\3.1\file1110aa8f0a\INLA’ to ‘C:\Users\Ali\Documents\R\win-library\3.1\INLA’

The downloaded binary packages are in
C:\Users\Ali\AppData\Local\Temp\RtmpKaDLSL\downloaded_packages


> library(INLA)
Error in library(INLA) : there is no package called ‘INLA’
> require(INLA)
Loading required package: INLA
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘INLA’


Please I need your help to fix this problem !

Daniel Simpson

unread,
May 7, 2016, 6:23:10 AM5/7/16
to Ali Mansour, R-inla discussion group
Hi,
I've seen this before - it seems to be a weird r-studio on windows quirk.  For some reason it is trying to put the files into a directory that doesn't exist. 

If you can find where your R-packages are stored (ie the installation directory for R), then you can manually copy the folder from
C:\Users\Ali\AppData\Local\Temp\RtmpKaDLSL\downloaded_packages
To the relevant location. 

Hope this helps,

Dan

--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To post to this group, send email to r-inla-disc...@googlegroups.com.
Visit this group at https://groups.google.com/group/r-inla-discussion-group.
For more options, visit https://groups.google.com/d/optout.

Ali Mansour

unread,
May 7, 2016, 6:31:05 AM5/7/16
to R-inla discussion group



I tried even though to change the default R package as shown in the above photo and I got the same error :(

Ali Mansour

unread,
May 7, 2016, 7:02:27 AM5/7/16
to R-inla discussion group
I did with your advice Mr. Simpson, thank you very much for that hint :) ,  In addition I want to menshioned that I got the following lines in RStudio as I wanted to check the package INLA after I moved the INLA file to the library file in R:

> library(INLA)
Loading required package: sp
Loading required package: Matrix
Loading required package: splines
Error in library(INLA) : 
  package ‘INLA’ does not have a namespace and should be re-installed
In addition: Warning messages:
1: package ‘INLA’ was built under R version 3.2.3 
2: package ‘sp’ was built under R version 3.1.3 
> ? INLA
No documentation for ‘INLA’ in specified packages and libraries:
you could try ‘??INLA’
> ?INLA
No documentation for ‘INLA’ in specified packages and libraries:
you could try ‘??INLA’
> help(INLA)
No documentation for ‘INLA’ in specified packages and libraries:
you could try ‘??INLA’
> require(INLA)
Loading required package: INLA
Failed with error:  ‘package ‘INLA’ does not have a namespace and should be re-installed’
In addition: Warning message:
package ‘INLA’ was built under R version 3.2.3 

R-INLA is working hopfully fine then with "R version 3.2.3" as I checked and shown below:

> library(INLA)
Loading required package: sp
Loading required package: Matrix
Loading required package: splines
This is INLA 0.0-1462127027, dated 2016-05-01 (14:00:55+0200).
See www.r-inla.org/contact-us for how to get help.
Warning message:
package ‘sp’ was built under R version 3.2.5 

# :) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :):) :) 


On Saturday, May 7, 2016 at 12:19:15 PM UTC+2, Ali Mansour wrote:
Reply all
Reply to author
Forward
0 new messages