Creates a dput-like pasteable format that can be used to create small tables.

mc_tribble(indf, indents = 4, mdformat = TRUE)

Arguments

indf

The input data.frame.

indents

The number of spaces to indent each line of output. Defaults to 4.

mdformat

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

References

http://stackoverflow.com/q/42839626/1270695

Author

Ananda Mahto. Name courtesy of Frank.

Examples

if (FALSE) { short_iris <- head(iris) mc_tribble(short_iris) }