
Last chance! 50% off unlimited learning
Sale ends in
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)
"source"
attribute (from R version
2.13.x or earlier) and the "srcref"
and related attributes.
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
Run the code above in your browser using DataLab