[R] Add use of dput() to the instructions at bottom of post?
David Winsemius
dwinsemius at comcast.net
Mon Jun 27 16:00:24 CEST 2011
On Jun 27, 2011, at 9:44 AM, Ivan Calandra wrote:
> I actually thought it was in the posting guide, but I could not find
> it with a text search. Did I overlook it?
The Posting Guide has an equivalent method it suggests. It has the
trivial advantantage of being truly cut-and-pastable but the
disadvantage (relative to dput) that it requires the object to be
quoted and the file argument to be specified.
> dump("param", file="")
param <-
structure(list(pi = c(0.5552, 0.2739, 0.1709), mu = c(-0.4868,
8.3846, 12.5317), sigma = c(2.044, 1.399, 1.036)), .Names = c("pi",
"mu", "sigma"), class = "data.frame", row.names = c("1", "2",
"3"))
--
David.
>
> I'm not sure that adding the dput() function at the bottom of every
> e-mail will help, since you don't see it when you write an e-mail,
> just when you receive one. Though it cannot hurt to add it.
>
> Ivan
>
> Le 6/27/2011 15:00, John Kane a écrit :
>> It's often difficult to figure out what a problem data set looks
>> like when someone pastes a mess of output from R into an e-mail.
>> The dput command, used judiciously—I would hope no one would send a
>> 1 M data set—can make life much easier.
>>
>> I wonder if it would be useful to add a hint in the instructions at
>> the bottom of the posting page, where the list asks for self-
>> contained reproducible code, to also hint at using dput() to supply
>> sample data?
>>
>> I suspect a considerable number of relatively new users do not know
>> that it exists--certainly that was true for me for quite a long time.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> --
> Ivan CALANDRA
> PhD Student
> University of Hamburg
> Biozentrum Grindel und Zoologisches Museum
> Dept. Mammalogy
> Martin-Luther-King-Platz 3
> D-20146 Hamburg, GERMANY
> +49(0)40 42838 6231
> ivan.calandra at uni-hamburg.de
>
> **********
> http://www.for771.uni-bonn.de
> http://webapp5.rrz.uni-hamburg.de/mammals/eng/1525_8_1.php
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list