restorePackages(sessionTools)
restorePackages()所属R语言包:sessionTools
Restore Session Packages
恢复会话包
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Install packages that are missing from the local package library, but are described in the sessionInfo object. Future releases of this package will potentially allow the caller to specify package version options such as "latest", "referenced" for each package so that the each packge can be either upgraded to the latest version (if installed), or moved to the version referenced in the sessionInfo object, or left unchanged.
安装缺少的包,从本地软件包库,但中描述的sessionInfo对象。这个包的未来版本将有可能允许调用者指定包的版本,如“最新”,“引用的”为每个包,每个装箱率可以被升级到最新版本(如果已安装),或移动到参考引用的版本在sessionInfo对象,或保持不变。
Currently, this function will only install a package if it is not already installed, and will always install the latest version available from the repository. If a package is already installed the installed version will be left intact.
目前,此功能将只安装一个软件包,如果尚未安装,将始终安装最新版本可从资料库。如果已经安装包安装的版本将保持不变。
用法----------Usage----------
restorePackages(sessionInfo, repos = getRepos(), warn = TRUE)
参数----------Arguments----------
参数:sessionInfo
A sessionInfo object
一个sessionInfo对象
参数:repos
The repositories to search for packages
库来搜索软件包
参数:warn
Boolean indicating whether a warning be displayed if not all packages can be installed.
布尔值,指示是否显示警告如果不是所有的软件包可以安装。
值----------Value----------
This method is executed for it's side-effects, which is to install packages to the default library.
此方法执行它的副作用,这是安装程序包的默认库。
(作者)----------Author(s)----------
Matthew D. Furia <a href="mailto:matt.furia@sagebase.org">matt.furia@sagebase.org</a>
<a href="https://github.com/MattNapsAlot">https://github.com/MattNapsAlot</a>
实例----------Examples----------
## Not run: [#不运行:]
## get the session description[获取会话描述]
info <- sessionSummary()
## save to a binary[#保存为二进制]
save(info, file="sessionInfo.rbin")
## restore[#恢复]
load(file = "sessionInfo.rbin")
restorePackages(info)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|