是否可以选择在没有文档的情况下安装 R 包以提高存储效率?

问题描述 投票:0回答:1

我正在一台存储容量非常小的机器上安装基于 Docker 文件的软件包。 我的问题是,是否有任何方法可以安装更轻量级版本的 R 包,从而避免包中部署代码(例如文档)的非关键部分。 有没有办法通过

install.packages
做到这一点? 不然还有其他办法吗?

r docker dockerfile install.packages
1个回答
0
投票

您可以手动指定您想要安装的内容,例如:

R CMD INSTALL [options] <package-name>
或使用
install.packages("package-name", INSTALL_opts = c("--option1", "--option2"))
,其中适合您情况的相关选项可能如下:

      --no-docs     do not install HTML, LaTeX or examples help
      --no-html     do not build HTML help
      --no-R, --no-libs, --no-data, --no-help, --no-demo, --no-exec,
      --no-inst
            suppress installation of the specified part of the
            package for testing or other special purposes
      --libs-only   only install the libs directory
      --data-compress=  none, gzip (default), bzip2 or xz compression
            to be used for lazy-loading of data
      --resave-data re-save data files as compactly as possible
      --compact-docs    re-compress PDF files under inst/doc
© www.soinside.com 2019 - 2024. All rights reserved.