removeSource

0th

Percentile

Remove Stored Source from a Function.

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.

Keywords
utility
Usage
removeSource(fn)
Arguments
fn
A single function from which to remove the source.
Details

This removes the "srcref" and related attributes.

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.

Aliases
  • removeSource
Examples
library(utils) fn <- function(x) { x + 1 # A comment, kept as part of the source } fn fn <- removeSource(fn) fn
Documentation reproduced from package utils, version 3.3, License: Part of R 3.3

Community examples

Looks like there are no examples yet.