Closed JohannesTan closed 5 years ago
The issue here is that your project depends on a package, rethinking, that you don't have installed apparently.
You either
library(rethinking)
, require(rethinking)
, rethinking::<fun>
, ...)Thank you for your advice! I installed the package by following the github page you mentioned. I resolved the problem after that.
install.packages(c("coda","mvtnorm","devtools","loo"))
library(devtools)
devtools::install_github("rmcelreath/rethinking")
I learned, thanks to your comment, that this package is not on CRAN, so I could not install it with install.packages()
function.
Johannes
Please, I have a conflict with "rethinking" and "packrat". I tried to initiate "packrat", with my existing project, but here's the error:
packrat::init() Initializing packrat project in directory:
"~/Desktop/functional_response_herbivore_fish" Error: Unable to retrieve package records for the following packages: 'rethinking' In addition: Warning messages: 1: In FUN(X[[i]], ...) : Package 'rethinking' not available in repository or locally 2: In FUN(X[[i]], ...) : Failed to infer source for package 'bdsmatrix'; using latest available version on CRAN instead
downloaded 2.1 MB Error in file(filename, "r", encoding = encoding) : cannot open the connection Calls: source -> file In addition: Warning message: In file(filename, "r", encoding = encoding) : cannot open file 'packrat/init.R': No such file or directory Execution halted Warning in install.packages : installation of package ‘rethinking’ had non-zero exit status The downloaded source packages are in ‘/private/var/folders/p4/f6_qlcws5bn0t43ytfhf18x00000gn/T/RtmpXDBdZO/downloaded_packages’
R version 3.6.3 (2020-02-29) -- "Holding the Windsock" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin15.6.0 (64-bit)
Hi
I got an error and warnings after executing packrat::init() as follows.
Then, I updated all packages and tried to install the package "rethinking", but...
I am unsure what I should do next to resolve these problems. Thanks!
Johannes