testInstalledPackage(tools)
testInstalledPackage()所属R语言包:tools
Test Installed Packages
测试已安装的软件包
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions allow an installed package to be tested, or all base and recommended packages.
这些功能允许安装的软件包进行测试,或所有的基地和推荐的软件包。
用法----------Usage----------
testInstalledPackage(pkg, lib.loc = NULL, outDir = ".",
types = c("examples", "tests", "vignettes"),
srcdir = NULL, Ropts = "")
testInstalledPackages(outDir = ".", errorsAreFatal = TRUE,
scope = c("both", "base", "recommended"),
types = c("examples", "tests", "vignettes"),
srcdir = NULL, Ropts = "")
testInstalledBasic(scope = c("basic", "devel", "both"))
参数----------Arguments----------
参数:pkg
name of an installed package.
已安装的软件包的名称。
参数:lib.loc
library path(s) in which to look for the package. See library.
库路径(S),在其中寻找包。看到library。
参数:outDir
the directory into which to write the output files: this should already exist.
到其中写入输出文件的目录:这应该已经存在。
参数:types
type(s) of tests to be done.
类型(S)进行的测试。
参数:errorsAreFatal
logical: should testing terminate at the first error?
逻辑:测试应终止在第一个错误?
参数:srcdir
Optional directory to look for .save files.
可选的目录去寻找.save文件。
参数:Ropts
Additional options such as -d valgrind to be passed to R CMD BATCH when running examples or tests.
附加选项,如-d valgrind要传递给R CMD BATCH运行时实例或测试。
参数:scope
Which set(s) should be tested?
其中一组(S)应测试?
Details
详情----------Details----------
These tests depend on having the package example files installed (which is the default). If package-specific tests are found in a "tests" directory they can be tested: these are not installed by default, but will be if R CMD INSTALL --install-tests was used. Finally, the R code in any vignettes can be extracted and tested.
这些测试依赖于安装包示例文件(这是默认的)。如果被发现在特定的封装测试“tests目录,他们可以进行测试:这些不是默认安装的,但如果R CMD INSTALL --install-tests使用。最后,在任何护身符R代码可以提取和测试。
Package tests are run in a "<VAR>pkg</VAR>-tests" subdirectory of "outDir", and leave their output there.
封装测试运行在一个<VAR>pkg</VAR>-tests子目录outDir,那里离开他们的输出。
testInstalledBasic runs the basic tests, if installed. This should be run with LC_COLLATE=C set: the function tries to set this by it may not work on all OSes. For non-English locales it may be desirable to set environment variables LANGUAGE to en and LC_TIME to C to reduce the number of differences from reference results.
testInstalledBasic运行的基本测试,如果安装了。这应与LC_COLLATE=C集:函数试图设置可能无法在所有的操作系统上运行。对于非英语语言环境,它可能需要设置环境变量LANGUAGEen和LC_TIMEC参考结果的差异,以减少数量。
The package-specific tests for the base and recommended packages are an optional part of the install. Currently testing requires a Unix-like diff for a full report if more than simple differences are found.
包特定的测试为基础,并建议包安装的可选部分。目前,测试需要一个类Unix diff完整的报告,如果发现超过简单的差异。
值----------Value----------
Invisibly 0L for success, 1L for failure.
无形0L成功,1L失败的。
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|