Converting an R object to text, with dput()

We’ve already briefly covered making a reproducible example, but I thought I’d go a little more in-depth on the very helpful function dput().

Whenever I am having trouble applying an operation to some R object, and need help, but want to avoid the potential hassle of transferring files and code to another person’s computer, I look to make a reproducible example and/or use dput() to efficiently convey the problematic object.

The simplest way to see how dput() works is by example, so…

By d-sparks

Tags: base basic rstats