R语言:system.file()函数中文帮助文档(中英文对照)

system.file(base)
system.file()所属R语言包:base

                                        Find Names of R System Files
                                         R系统文件的名称

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Finds the full file names of files in packages etc.
发现在包等文件的完整文件名


用法----------Usage----------


system.file(..., package = "base", lib.loc = NULL, mustWork = FALSE)



参数----------Arguments----------

参数:...
character vectors, specifying subdirectory and file(s) within some package.  The default, none, returns the root of the package.  Wildcards are not supported. 
特征向量,指定一些包内的子目录和文件(S)。默认情况下,没有返回的包的根。不支持通配符。


参数:package
a character string with the name of a single package. An error occurs if more than one package name is given. 
用一个单一的包的名称的字符串。发生错误,如果多个包名。


参数:lib.loc
a character vector with path names of R libraries. See "Details" for the meaning of the default value of NULL. 
与特征向量的R库的路径名。 NULL默认值的含义,请参阅“详细资料”。


参数:mustWork
logical.  If TRUE, an error is given if there are no matching files. 
逻辑。如果TRUE,给出了一个错误,如果没有匹配的文件。


Details

详情----------Details----------

This checks the existence of the specified files with file.exists.  So file paths are only returned if there are sufficient permissions to establish their existence.
这检查存在file.exists指定的文件。所以只返回文件路径,如果有足够的权限来建立他们的存在。

The unnamed arguments in ... are usually character strings, but if character vectors they are recycled to the same length.
...无名参数通常是字符串,但如果特征向量,它们回收到相同的长度。

This uses find.package to find the package, and hence with the default lib.loc = NULL looks first for attached packages then in each library listed in .libPaths().
这将使用find.package找到包,默认lib.loc = NULL因此看起来第一附加软件包,然后在.libPaths()中列出的每个库。


值----------Value----------

A character vector of positive length, containing the file paths that matched ..., or the empty string, "", if none matched (unless mustWork = TRUE).
...的积极长度的特征向量,包含匹配的文件路径,或空字符串,"",如果没有匹配(除非mustWork = TRUE)。

If matching the root of a package, there is no trailing separator.
如果匹配的包的根,有没有尾随分隔。

system.file() with no arguments gives the root of the base package.
system.file()给base包的根,不带任何参数。


参见----------See Also----------

R.home for the root directory of the R installation, list.files.
R.homeR安装,list.files根目录。

Sys.glob to find paths via wildcards.
Sys.glob找到通过通配符的路径。


举例----------Examples----------


system.file()                  # The root of the 'base' package[基地包的根]
system.file(package = "stats") # The root of package 'stats'[包统计的根源]
system.file("INDEX")
system.file("help", "AnIndex", package = "splines")

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值