在Rstudio中常遇到Matrix and TMB包版本的问题:
或者是其他类似的问题:
Warning message:
In checkMatrixPackageVersion() : Package version inconsistency detected.
TMB was built with Matrix version xx.xx.xx
Current Matrix version is yy.yy.yy
Please re-install 'TMB' from source using install.packages('TMB', type = 'source') or
ask CRAN for a binary version of 'TMB' matching CRAN's 'Matrix' package
解决方法:
(1)安装Matrix包:install.packages("Matrix")
(2)重启R,安装TMB:devtools::install_github("kaskr/adcomp/TMB", dependencies=TRUE, force=TRUE)
(3)重启R,安装GitHub中需要的包:install_github("cavios/tshydro/tsHydro")
参考资料:https://github.com/timjmiller/wham/issues/33