removeSource {utils} | R Documentation |
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.
removeSource(fn)
fn |
A single function from which to remove the source. |
This removes both the "source"
attribute (from R version
2.13.x or earlier) and the "srcref"
and related attributes.
A copy of the function with the source removed.
srcref
for a description of source reference records,
deparse
for a description of how functions are deparsed.
fn <- function(x) { x + 1 # A comment, kept as part of the source } fn fn <- removeSource(fn) fn