sodput: Create complete code to create an object and copy to...

Description Usage Arguments Author(s) Examples

View source: R/sodput.R

Description

In several cases, you may want to give a sample dataset. dput is a great tool for doing so. This tool takes the dput output and places it on the clipboard, as well as adding an assignment operator.

Usage

1
sodput(object, rows = TRUE, indents = 4, mdformat = TRUE)

Arguments

object

R object to convert to code.

rows

numeric. Vector of row numbers. These rows will be produced in the output. By default, all rows are included.

indents

integer. Spaces to be added before each line.

mdformat

logical. Whether or not to add 4 spaces before every line in order to format as a code block.

Author(s)

Tyler Rinker

Examples

1
2
3
4
5
## Not run: 
sodput(mtcars)
sodput(mtcars, rows=1:6)

## End(Not run)

sebastian-c/overflow documentation built on May 29, 2019, 4:56 p.m.