我在安装brms R包时遇到了一个错误。

huangapple go评论74阅读模式
英文:

I'm getting an error when installing brms R package

问题

"I'm trying to install 'brms' package but keep getting an error.
First, I installed 'brms' package, and then call the package from the library.
I'm getting the following error message. 'Error in library(brms) : there is no package called ‘brms’
Can someone help me?"

Error in library(brms) : there is no package called ‘brms’

英文:

I'm trying to install "brms" package but keep getting an error.
First, I installed "brms" package, and then call the package from the library.
I'm getting the following error message. "Error in library(brms) : there is no package called ‘brms’
Can someone help me?

install.packages("brms")

Installing package into ‘C:/Users/.......’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is
  later:
     binary source needs_compilation
brms 2.17.0 2.18.0             FALSE

installing the source package ‘brms’

trying URL 'https://cran.rstudio.com/src/contrib/brms_2.18.0.tar.gz'
Content type 'application/x-gzip' length 4486548 bytes (4.3 MB)
downloaded 4.3 MB

* installing *source* package 'brms' ...
** package 'brms' successfully unpacked and MD5 sums checked
** using staged installation
** R
Warning: namespace 'brms' is not available and has been replaced
by .GlobalEnv when processing object 'brmsfit_example1'
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Warning message:
package 'Rcpp' was built under R version 4.0.5 
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'Brobdingnag'
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package 'brms'
* removing 'C:/Users/....'
Warning in install.packages :
  installation of package ‘brms’ had non-zero exit status

The downloaded source packages are in
	‘C:\Users\....\downloaded_packages’

library(brms)

> Error in library(brms) : there is no package called ‘brms’

答案1

得分: 1

请注意警告中的信息:"installation of package ‘brms’ had non-zero exit status" 意味着安装失败。

以及"there is no package called 'Brobdingnag'" 意味着缺少此依赖项,请查看?install.packages

您可以使用参数dependencies = TRUE

英文:

Note in the warning :
installation of package ‘brms’ had non-zero exit status means that the installation failed.

and there is no package called 'Brobdingnag' means that this dependency is missing
see ?install.packages
you can use the argument dependencies = TRUE

答案2

得分: 0

在这种情况下,你可能没有让'install'步骤完成。该软件包有很多依赖项。再次尝试install.packages("brms")函数,并等待它完成。

英文:

In that case, you probably didn't let the 'install' step finish. That package has a lot of dependencies. Try install.packages("brms") function again and wait for it to finish.

huangapple
  • 本文由 发表于 2023年2月19日 12:21:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/75497967.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定