When options("keep.source") is TRUE, a copy of the original source code to a function is stored with it. This function removes that copy.
当options("keep.source")是TRUE,原始的源代码函数的副本存储它。此功能删除该副本。
用法----------Usage----------
removeSource(fn)
参数----------Arguments----------
参数:fn
A single function from which to remove the source.
一个单一的功能,从中取出源。
Details
详情----------Details----------
This removes both the "source" attribute (from R version 2.13.x or earlier) and the "srcref" and related attributes.
这消除"source"属性(R版本2.13.x或更早)和"srcref"和相关属性。
值----------Value----------
A copy of the function with the source removed.
一个副本删除源的功能。
参见----------See Also----------
srcref for a description of source reference records, deparse for a description of how functions are deparsed.
srcref源引用记录的描述,deparse的功能是如何deparsed描述。
举例----------Examples----------
fn <- function(x) {
x + 1 # A comment, kept as part of the source[评论,保持源的一部分]
}
fn
fn <- removeSource(fn)
fn