Converting an R object to text, with dput()

[This article was first published on is.R(), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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…

To leave a comment for the author, please follow the link and comment on their blog: is.R().

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)