为了节省时间,我想使用预安装的R库创建一个docker映像。 ->节省大量时间
Dockerfile
的一部分看起来像这样
RUN Rscript -e 'require(devtools); devtools::install_version("dplyr", version="0.5.0", repos = "http://cran.rstudio.com/")'
RUN Rscript -e 'library(dplyr); sessionInfo()'
RUN Rscript -e 'require(devtools); devtools::install_version("ggplot2", version="2.2.1", repos = "http://cran.rstudio.com/")'
RUN Rscript -e 'library(dplyr); sessionInfo()'
RUN Rscript -e 'require(devtools); devtools::install_version("knitr", version="1.15.1", repos = "http://cran.rstudio.com/")'
RUN Rscript -e 'library(dplyr); sessionInfo()'
RUN Rscript -e 'require(devtools); devtools::install_version("tidyr", version="0.6.0", repos = "http://cran.rstudio.com/")
由于这是生产环境,所以我不希望有任何惊喜。因此,我想每次都安装相同版本的软件包,因此要在上面看到特定的版本。
现在是我的问题:如果我们看一下tidyr软件包(v0.6.0)的Description文件: https://github.com/tidyverse/tidyr/blob/v0.6.0/DESCRIPTION
它说:
Imports:
tibble,
dplyr (>= 0.4),
stringi,
lazyeval,
magrittr,
Rcpp
在我的系统中,我已经预装了dplyr 0.5.0,因此这不会触发更新。
这是我的docker输出(请注意,我添加了sessionInfo()语句以显示已安装的dplyr版本),如您所见,系统上已安装dplyr 0.5.0,然后tidyr版本0.6.0会强制安装dplyr ,tidyselect和plogr。
Step 56/103 : RUN Rscript -e 'library(dplyr); sessionInfo()'
---> Running in 587c27a05216
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Warning message:
As of rlang 0.4.0, dplyr must be at least version 0.8.0.
x dplyr 0.5.0 is too old for rlang 0.4.2.
i Please update dplyr with `install.packages("dplyr")`.
R version 3.2.5 (2016-04-14)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets base
other attached packages:
[1] dplyr_0.5.0
loaded via a namespace (and not attached):
[1] magrittr_1.5 R6_2.4.1 assertthat_0.2.1 cli_2.0.0
[5] tools_3.2.5 DBI_1.1.0 pillar_1.4.3 glue_1.3.1
[9] tibble_2.1.3 crayon_1.3.4 Rcpp_1.0.3 fansi_0.4.0
[13] methods_3.2.5 pkgconfig_2.0.3 rlang_0.4.2
---> e55ec5828abb
Removing intermediate container 587c27a05216
Step 57/103 : RUN Rscript -e 'require(devtools); devtools::install_version("tidyr", version="0.6.0", repos = "http://cran.rstudio.com/")'
---> Running in 09ada6215edb
Loading required package: devtools
Loading required package: usethis
Downloading package from url: http://cran.rstudio.com//src/contrib/Archive/tidyr/tidyr_0.6.0.tar.gz
dplyr (0.5.0 -> 0.8.3) [CRAN]
tidyselect (NA -> 0.2.5) [CRAN]
plogr (NA -> 0.2.0) [CRAN]
Installing 3 packages: dplyr, tidyselect, plogr
Installing packages into '/usr/local/r-libs'
(as 'lib' is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/dplyr_0.8.3.tar.gz'
Content type 'application/x-gzip' length 1173098 bytes (1.1 MB)
==================================================
downloaded 1.1 MB
trying URL 'http://cran.rstudio.com/src/contrib/tidyselect_0.2.5.tar.gz'
Content type 'application/x-gzip' length 21883 bytes (21 KB)
==================================================
downloaded 21 KB
trying URL 'http://cran.rstudio.com/src/contrib/plogr_0.2.0.tar.gz'
Content type 'application/x-gzip' length 7795 bytes
==================================================
downloaded 7795 bytes
* installing *source* package 'tidyselect' ...
** package 'tidyselect' successfully unpacked and MD5 sums checked
** libs
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I/usr/local/include -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c RcppExports.cpp -o RcppExports.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I/usr/local/include -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c combine_variables.cpp -o combine_variables.o
g++ -shared -L/usr/local/lib64 -o tidyselect.so RcppExports.o combine_variables.o
installing to /usr/local/r-libs/tidyselect/libs
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (tidyselect)
* installing *source* package 'plogr' ...
** package 'plogr' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (plogr)
* installing *source* package 'dplyr' ...
** package 'dplyr' successfully unpacked and MD5 sums checked
** libs
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c RcppExports.cpp -o RcppExports.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c address.cpp -o address.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c api.cpp -o api.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c arrange.cpp -o arrange.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c between.cpp -o between.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c bind.cpp -o bind.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c distinct.cpp -o distinct.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c encoding.cpp -o encoding.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c filter.cpp -o filter.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c group_indices.cpp -o group_indices.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c hybrid.cpp -o hybrid.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c init.cpp -o init.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c join.cpp -o join.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c join_exports.cpp -o join_exports.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c mutate.cpp -o mutate.o
gcc -std=gnu99 -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -c rlang-export.c -o rlang-export.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c rlang.cpp -o rlang.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c select.cpp -o select.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c set.cpp -o set.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c summarise.cpp -o summarise.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c test.cpp -o test.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c utils-bindings.cpp -o utils-bindings.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c utils.cpp -o utils.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR -I/usr/local/include -I"/usr/local/r-libs/BH/include" -I"/usr/local/r-libs/plogr/include" -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c window.cpp -o window.o
g++ -shared -L/usr/local/lib64 -o dplyr.so RcppExports.o address.o api.o arrange.o between.o bind.o distinct.o encoding.o filter.o group_indices.o hybrid.o init.o join.o join_exports.o mutate.o rlang-export.o rlang.o select.o set.o summarise.o test.o utils-bindings.o utils.o window.o
installing to /usr/local/r-libs/dplyr/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (dplyr)
The downloaded source packages are in
'/tmp/Rtmp3DsAO3/downloaded_packages'
Installing package into '/usr/local/r-libs'
(as 'lib' is unspecified)
* installing *source* package 'tidyr' ...
** package 'tidyr' successfully unpacked and MD5 sums checked
** libs
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I/usr/local/include -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c RcppExports.cpp -o RcppExports.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I/usr/local/include -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c fill.cpp -o fill.o
g++ -I/my-software/include -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c melt.cpp -o melt.o
g++ -I/my-software/usr/local/bin/lib64/R/include -DNDEBUG -I/usr/local/include -I"/usr/local/r-libs/Rcpp/include" -fpic -O3 -std=gnu++0x -c simplifyPieces.cpp -o simplifyPieces.o
g++ -shared -L/usr/local/lib64 -o tidyr.so RcppExports.o fill.o melt.o simplifyPieces.o
installing to /usr/local/r-libs/tidyr/libs
** R
** data
*** moving datasets to lazyload DB
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (tidyr)
---> 6e55e42fb917
Removing intermediate container 09ada6215edb
Step 58/103 : RUN Rscript -e 'library(dplyr); sessionInfo()'
---> Running in c917b6912a89
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
R version 3.2.5 (2016-04-14)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets base
other attached packages:
[1] dplyr_0.8.3
loaded via a namespace (and not attached):
[1] tidyselect_0.2.5 magrittr_1.5 assertthat_0.2.1 R6_2.4.1
[5] pillar_1.4.3 glue_1.3.1 tibble_2.1.3 crayon_1.3.4
[9] Rcpp_1.0.3 methods_3.2.5 pkgconfig_2.0.3 rlang_0.4.2
[13] purrr_0.3.3
---> b4f3949d3bf8
Removing intermediate container c917b6912a89
重要的一点是:
Downloading package from url: http://cran.rstudio.com//src/contrib/Archive/tidyr/tidyr_0.6.0.tar.gz
dplyr (0.5.0 -> 0.8.3) [CRAN]
R在哪里发现这些依赖关系,因为它们不在DESCRIPTION文件中(并且已经满足dplyr v0.4.0> =)?
答案 0 :(得分:2)
输出的一部分告诉您答案
As of rlang 0.4.0, dplyr must be at least version 0.8.0.
如果要使用rlang 0.4.0,则至少需要dplyr 0.8.0。
请使用较少的docker层,尤其是在生产中使用该映像时。或挤压最后的层。
构建图像时,有一个要压扁的标志。记录在这里
要点
docker image build --squash -t myimage:mytag .
出于各种基础设施设置之间的兼容性,我建议不要超过42个图像层。这是有关42层的语句的起源:
答案 1 :(得分:0)
感谢您的上一则评论,但我仍然更喜欢以前的标题:
'R包描述文件不受R尊重吗?' (至少是第一部分)。
我设法解决了与rlang或dplyr的警告消息无关的问题,但是下面的行实际上是自动升级的,根据Hadley的说法,这似乎是默认行为(请参见https://github.com/r-lib/devtools/issues/863#issuecomment-137241474)
RUN Rscript -e 'require(devtools); devtools::install_version("tidyr", version="1.0.0", repos = "http://cran.rstudio.com/"'
在上方调整此行以添加
upgrade = 'never'
(并更新到v1.0.0)实际上解决了该问题,因为现在不再更新已经满足的软件包。 (请参见下面的新行)
RUN Rscript -e 'require(devtools); devtools::install_version("tidyr", version="1.0.0", repos = "http://cran.rstudio.com/", upgrade = "never")'
我知道这并不是真正的“答案”,因为链接中的评论者认为这是预期的行为,但仍希望将其发布在此处,以供将来遇到相同问题的人使用。
我的主要问题是,从哲学的角度来看,我会理解install.packages()将安装R软件包的最新版本。但是,如果使用devtools :: install_version(),则可能是因为您要安装特定版本的软件。在那种情况下,不升级依赖关系是否有意义?这将链接回原始标题,即如果根据DEPENDANCIES文件满足了依存关系,R是否应在默认情况下真正强制升级?