[R] Add use of dput() to the instructions at bottom of post?

John Kane jrkrideau at yahoo.ca
Mon Jun 27 17:14:35 CEST 2011


Apologies David,

Every once in a while I hit the wrong reply button. The post was meant to be a Reply All.  I'll post this one to the list.

--- On Mon, 6/27/11, David Winsemius <dwinsemius at comcast.net> wrote:

> From: David Winsemius <dwinsemius at comcast.net>
> Subject: Re: [R] Add use of dput() to the instructions at bottom of post?
> To: "John Kane" <jrkrideau at yahoo.ca>
> Received: Monday, June 27, 2011, 10:30 AM
> 
> On Jun 27, 2011, at 10:10 AM, John Kane wrote:
> 
> > A bit more complicated but it is there. However it
> also looks pretty scary for a newbie, assuming they even
> understand the purpose.
> > 
> > The real problem as David points out in another post
> is that given what we see in R-help most people don't read
> the postamble (well it's not a preamble!)  so the
> chances of them reading the Posting Guide is petty low.
> Sticking dput() in the postamble, at leas,t makes it a
> little bit easier for it to be seen.
> 
> It wasn't posted and neither was this one since you are
> replying to a private message, but I didn't say anything in
> that message I am ashamed to say in public. If you want to
> post this reply, go ahead.
> 
> I said I thought it would have the same net effect as the
> admonitions to read the Posting Guide currently appear to
> have, namely none. 



>I suggested further that only an "answer
> strike" by the contributor nucleus would have any chance of
> altering poster behavior. Perhaps we can have the analog of
> "meatless Mondays". We could see how many of the regular
> answerers would commit to ignoring posts on weekends and
> Mondays that do not include cut -and-pastable examples. A
> canned message could be sent privately (so as not to add
> more noise to the Archive) that had directions on how to
> construct an appropriate example.

I had not had time to consider this but since the mob has thinned out here I now do.

I had not really thought that you were serious, considering that a substantial amount of work would be required but it might be a good idea. A major problem that I see is the fact that the list gains membership all the time so it might only catch some but that is probably better than none as we have now.  The force of example might also help if some posters read the list regularly.

A good time to start it, if the idea takes off, might be in the Sept-Nov period when, I believe,  the majority of Northern Hemisphere academic institutions are starting up after summer breaks

A canned message about how to produce an acceptable example, by itself, would be very worth while.  In fact, I think I'll toss together one of my own for times when I am trying to answer a question with too little information supplied.

> 
> We could do a "clinical trial" ... add the dput suggestion,
> count the number of example-less messages in a two or three
> week period, conduct the strike, compare poster behavior.
> And yes, I do know the weaknesses of that design.
> 

Much better than nothing at all.
And a repeat 'clincial trial' every few months might help.

> --Dave
> 
> > 
> > 
> > --- On Mon, 6/27/11, David Winsemius <dwinsemius at comcast.net>
> wrote:
> > 
> >> From: David Winsemius <dwinsemius at comcast.net>
> >> Subject: Re: [R] Add use of dput() to the
> instructions at bottom of post?
> >> To: ivan.calandra at uni-hamburg.de
> >> Cc: r-help at r-project.org
> >> Received: Monday, June 27, 2011, 10:00 AM
> >> 
> >> 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
> >> 
> >> ______________________________________________
> >> 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