write_sigs(sig)
write_sigs()所属R语言包:sig
Write sigs to file
写的sigs文件
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Writes function signatures to a text file.
写入到一个文本文件中的函数签名。
用法----------Usage----------
write_sigs(envir, file, pattern = NULL, ...)
参数----------Arguments----------
参数:envir
An environment containing functions.
的环境中的功能。
参数:file
A file to write the output to.
将输出写入一个文件。
参数:pattern
If not NULL, a regular expression to filter the function names by.
如果不是NULL,正则表达式来过滤功能名称。
参数:...
passed to toString.sig.
传递到toString.sig。
值----------Value----------
Nothing of interest. Invoked for the side effect of writing function signatures to a file.
没有什么兴趣。调用到一个文件中编写的函数签名的副作用。
实例----------Examples----------
#From a package[从包]
tmpf <- tempfile(LETTERS[1:3], fileext = ".R")
on.exit(unlink(tmpf))
write_sigs(pkg2env(graphics), tmpf[1])
## Not run: [#不运行:]
shell(tmpf[1], wait = FALSE)
## End(Not run)[#(不执行)]
#Just functions beginning with 'a'.[只是用a开头的函数。]
write_sigs(pkg2env(graphics), tmpf[2], pattern = "^a")
## Not run: [#不运行:]
shell(tmpf[2], wait = FALSE)
## End(Not run)[#(不执行)]
#From a file[从一个文件]
e <- new.env()
sys.source(
system.file("extdata", "sample.R", package = "sig"),
envir = e
)
write_sigs(e, tmpf[3])
## Not run: [#不运行:]
shell(tmpf[3], wait = FALSE)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|