On 6/9/21 8:48 PM, peri He wrote:
> Dear Friends,
> I am running a simple code for rinla. The INLA package is installed successfully on Rstudio.
Techinically, the package is installed in an R library. You are using
Rstudio as your IDE, but it does not run packages.
> But when I run inla (y~x,......) function, I get the following error: could not find function "inla"
> Did anybody have the same problem before?
> I would appreciate it if any information is shared.
> install.packages("INLA", repos = "https://inla.r-inla-download.org/R/stable", dep = TRUE)
Despite setting dep=TRUE is still got a warning:
"Warning in install.packages :
dependencies ‘Ecdat’, ‘mpoly’, ‘symmoments’ are not available"
> N = 100 #500, 5000, 25000, 100000
> x = rnorm(N, mean=6, sd=2)
> y = rnorm(N, mean=x,sd=1)
> data = list(x=x, y=y, N=N)
> # The likelihood family is �gaussian�
> model<- inla(y ~ x, family = c("gaussian"), data = data, control.predictor=list(link=1))
> Summary <- (model)
Despite the warning, INLA installed and loaded without complaint and the
code ran without error.
I later ran:
install.packages(c('Ecdat', 'mpoly', 'symmoments')) # no problems
So I'm unable to recreate your error.
R version 4.0.4 (2021-02-15) #I'm admittedly not up-to-date, If
you are, then provide details
I did check to see if there are any later versions of pkg:INLA and could
not find any