Skip to contents

Converts the currently selected object in the RStudio editor into reproducible R source code and inserts it into the active document.

Usage

flushToSource(width.cutoff = 500L)

Arguments

width.cutoff

Integer. Passed to [base::deparse()].

Value

Invisibly returns the generated code.

Details

Data frames are converted into a readable `data.frame(...)` representation instead of the more verbose `dput()` structure output.

Other objects are serialized using [base::dput()].

Examples

if (FALSE) { # \dontrun{
flushToSource()
} # }