The output of dput
is usually much more complex than what a user would have typed to create the same object. I understand that this might be necessary to guarantee a 100% reproducibility (including for instance when different users use different default settings). However, it doesn't make examples as readable as they could be, and I often spend some time simplifying the output.
As an examples, consider:
dput(data.frame(a=1:10))
> structure(list(a = 1:10), .Names = "a", row.names = c(NA, -10L), class = "data.frame")
Isn't there an alternative to dput
that would simply return data.frame(a=1:10)
?