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.
>
> Regards,
>
> 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"
> library(INLA)
> 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
here either.
So I'm unable to recreate your error.
sessionInfo()
#-------------------
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
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS
Matrix products: default
BLAS:?? /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so
locale:
?[1] LC_CTYPE=en_US.UTF-8?????? LC_NUMERIC=C LC_TIME=en_US.UTF-8???????
LC_COLLATE=en_US.UTF-8
?[5] LC_MONETARY=en_US.UTF-8??? LC_MESSAGES=en_US.UTF-8
LC_PAPER=en_US.UTF-8?????? LC_NAME=C
?[9] LC_ADDRESS=C?????????????? LC_TELEPHONE=C
LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel? stats???? graphics? grDevices utils???? datasets methods??
base
other attached packages:
[1] INLA_21.02.23?????? sp_1.4-5??????????? foreach_1.5.1
Matrix_1.3-2??????? RBGL_1.66.0???????? graph_1.68.0
[7] BiocGenerics_0.36.0
loaded via a namespace (and not attached):
?[1] lattice_0.20-41???? codetools_0.2-18??? grid_4.0.4
MatrixModels_0.5-0? stats4_4.0.4??????? splines_4.0.4
?[7] iterators_1.0.13??? tools_4.0.4???????? yaml_2.2.1
compiler_4.0.4????? BiocManager_1.30.12
> [[alternative HTML version deleted]]
Rhelp is a plain-text mailing list. HTML is not welcome.
--
David.