Converting an R object to text, with dput()

September 20, 2012
By

(This article was first published on is.R(), and kindly contributed to R-bloggers)

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 his blog: is.R().

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , ,

Comments are closed.