17

For those not in the know:

is a package/library for R that assists in creating reproducible examples in a ready to post, Markdown-formatted, form.

For example, with input

x <- 1:3
y <- 2:5

outer(x, y, "+")

reprex typically produces output of the form


x <- 1:3
y <- 2:5

outer(x, y, "+")
#>      [,1] [,2] [,3] [,4]
#> [1,]    3    4    5    6
#> [2,]    4    5    6    7
#> [3,]    5    6    7    8

Created on 2019-07-04 by the reprex package (v0.3.0.9000)


What happens is than in a new environment, the code is run as normal, its output is captured, commented out, and appended to the code that generated it. This assembly is then wrapped in Markdown markup. Normally it's stored on your clipboard so you can immediately paste it to wherever you need it.

We love reproducible code on Stack Overflow, so I'm sure we all welcome tools like this, my question is concerning the attribution/time stamp in the footer; should this be removed?

The few times I've come across this I've swiftly edited it out, thinking it's precisely the sort of irrelevant fluff we want to avoid in our questions and answers, but recently I got some unexpected pushback.
I'm sure you can find the relevant answer if you search, but for now I'll present the original answerer's final argument, which I left unopposed, choosing to rather ask you all what's the correct call here.

@AkselA with power comes responsibility. The thing you consider "worth editing" is not right. I cannot and will not advise to avoid editing altogether, but will suggest considering far greater importance for giving credits. There is a reason reprex package put that line at the bottom. We are using that package, we should acknowledge their help.

  • This footer is referred to as 'advertisement' in the reprex docs. By default it is on, but the default can be changed, or toggled on a case-by-case basis. (see comment by Eric A below)
  • Other than maybe a Jupyter Notebook, I don't know exactly what to compare this kind of tool with for those not familiar with R.
  • I'm not aware of a similar issue occurring in other technologies, if there is it would be good to know, there's nothing inherently R-specific here.
  • I think we've ruled out any legal/license argument
  • As reprex is essentially a markup tool, you don't need it to run the example
16
  • 9
    Are you sure that the attribution is not something that is required by the license of the reprex package?
    – rene
    Commented Jul 4, 2019 at 17:46
  • 7
    @rene: It's got a standard MIT license.
    – AkselA
    Commented Jul 4, 2019 at 18:04
  • 1
    I'm not sure that output of the program requires attribution, but the MIT license itself does.
    – user4639281
    Commented Jul 4, 2019 at 18:25
  • 1
    @TinyGiant: "all copies or substantial portions of the Software" require that you carry the same license forward. FOSS requiring attribution for it's output, that can't be common.
    – AkselA
    Commented Jul 4, 2019 at 18:29
  • If you get an idea from another answer on SO to adress a question you are not required to reference, but I and many other users include some sort of a link to acknowledge that. Let's say license doesn't require us to do, shouldn't we consider leaving a line in small font for credits (not even writing it ourselves)? Commented Jul 4, 2019 at 19:27
  • Moreover, about this R-specific matter, leaving that line give users what version of reprex we are using. That will tell them what versions of libraries we used (as it is known based on reprex version) so later they can reproduce the answer if anything changes in those package. That's exactly the purpose reprex package. Commented Jul 4, 2019 at 19:33
  • @duplode first of all I didn't say it doesn't require us to do so since I did not investigated to know whether it does or not. I just said, not required, doesn't mean fluff. Fluff is something that is not only not unnecessary but also serves no purpose whatsoever. Like: "I am new to R, sorry if I am asking a simple question." About the second point, it's not a justification in my eyes, it's very well a legit reason to keep it. Commented Jul 4, 2019 at 20:21
  • 3
    @M-M: If your example depends on external libraries, that should be handled by library() calls. Reproducing R code formatted by reprex does not generally depend on reprex, so I fail to see what useful info the version number give.
    – AkselA
    Commented Jul 4, 2019 at 21:11
  • 3
    @M-M: How can it? It's perfectly possible to have an old reprex and a recent, say dplyr. If your code is dependent on a specific version of a package, specify that.
    – AkselA
    Commented Jul 4, 2019 at 21:20
  • (I have removed my previous comment, as it appears the remark about reproducibility I had made there was based on a wrong premise.)
    – duplode
    Commented Jul 4, 2019 at 21:48
  • 8
    Let's get one thing clear: there's absolutely no legal reason to include that text, and you can (and probably should) configure reprex to omit that line easily. A presentation by the creators found here (slide 44) explains how to turn it off by default. You can also do this per example (advertise = FALSE as an argument to the reprex function)
    – Erik A
    Commented Jul 5, 2019 at 10:29
  • 2
    The comments seems an awkward place for this, but don't think a separate question is right either, so... As someone who has contributed R answers using reprex, I have posted these taglines just because I didn't mess with default settings, as @ErikA helpfully pointed out is possible. I have been convinced by some of the reasoning in the answer below and comments not to do this anymore. How much should I worry about going back to edit it out of my old answers? Would this be considered flaggable as spam, as suggested by Alexei's answer below?
    – duckmayr
    Commented Jul 5, 2019 at 10:35
  • 3
    @duckmayr As long as you don't work for RStudio, Inc. I wouldn't worry about spam flags, but editing it out is certainly a good idea. You can identify your posts linking reprex easily using this search
    – Erik A
    Commented Jul 5, 2019 at 10:43
  • 2
    Just a quick search on "by the reprex package" (what a horrible name btw, I like MCVE much better ;) ), landed me 2.3K+ results. Plenty of editing left to do here. Should we ask a CM aka. @Shog9 to programmatically remove all these lines?
    – Luuklag
    Commented Jul 5, 2019 at 12:57
  • 5
    @Luuklag I'm worried that if Shog hears remove reprex one more time he might go insane though
    – Erik A
    Commented Jul 5, 2019 at 13:14

3 Answers 3

36

Remove as not directly related to the post.

Unless there is a useful information in that tag line (i.e. version of the library as hinted in comments) I would remove it.

So far tools used to produce posts are never credited as authors of posts. I don't see why this package should be any different. I also don't see any legal reason to keep it as https://reprex.tidyverse.org/ don't mention tagline anywhere.

Additionally such tag lines exist in part to promote libraries/products. In general promotion of products not directly related to the question considered spam (with potential for flagging).


Created on 2019-07-04 with the Intel CPU, ASUS monitor, and Microsoft Natural Ergonomic Keyboard 4000.

5
  • 3
    I find the reasoning provided in this answer to be quite lacking. The absence of evidence is not evidence of absence. Meaning that just because you didn't see anything in a cursory glance, doesn't mean that there isn't anything there. Likewise your attempt to "prove the point" by including that text at the bottom of your answer misses the mark because your answer was not generated by a program, nor was that random text that was appended. This reads like an attempt to dismiss a reasonable concern.
    – user4639281
    Commented Jul 4, 2019 at 23:49
  • 4
    @TinyGiant: He's not far off with that text, I'm sure you've seen 'Sent from my SM-A910F using Tapatalk' etc. all over various forums. A closer parallel in this case would maybe be if they credited the code syntax highlighter every time they posted some code. Or a 'created on 2019-06-06 by pdfTeX' was added to the bottom of your rendered LaTeX documents.
    – AkselA
    Commented Jul 5, 2019 at 8:54
  • 15
    @TinyGiant The adage “The absence of evidence is not evidence of absence” isn’t an absolute, and is often misused. In fact, a lot of science (in particular NHST) operates successfully on the principle that absence of evidence can be evidence of absence. More to the point, it’s perfectly good evidence in the present case, where Alexei is establishing the lack of precedence. You seem to believe that there’s a relevant difference between other software and reprex. You may be right, but the onus is on you to find evidence for this claim. Commented Jul 5, 2019 at 10:54
  • 1
    @TinyGiant reprex is distributed under a MIT license, which definitely doesn't demand attribution in the program output. The only mention of the footer in the documentation is a matter-of-fact description of the advertise option, which allows turning it off (see this page).
    – duplode
    Commented Jul 5, 2019 at 12:07
  • @duplode that sounds like a properly considered answer, unlike this one.
    – user4639281
    Commented Jul 5, 2019 at 14:07
-1

IANAL, but the MIT license of the reprex package only means that derivatives of the code must include the original copyright notice. The output of using the software does not have to be attributed in any way. This should answer the legal part of the question. We are free to do what we want in that regard.

That leaves one with the sole question if and what parts of the last line would be useful to include.

Created on 2019-07-04 by the reprex package (v0.3.0.9000)

I don't see the usefulness of the date, let's skip it.

Created by the reprex package (v0.3.0.9000)

In general I think, the code should stand/speak for itself. It doesn't matter so much, who created it (me, you, a program, another program). In particular, the usefulness of the version number may depend on how much and how often the output of the reprex package changes in a significant amount. Does it change often? I guess not.

I would recommend that those who think it's necessary to just add a small note like

created by reprex (v0.3.0.9000)

which is a compromise of giving additional context and keeping the text succinct, i.e. not distracting the reader with too much rather uninteresting information.

6
  • 2
    But once you've whittled it down that much, does it really add anything?
    – AkselA
    Commented Jul 5, 2019 at 11:04
  • @AkselA I don't have domain knowledge of R and don't know how important it really is to have the information that R code was created by the reprex software. I guess the value is rather low, but I rather err on the side of too much context than not enough context. I would leave the judgment to the original contributor or to experts in R. What I did in this answer was just removing the obvious fluff. Commented Jul 5, 2019 at 11:10
  • 1
    Actually the reprex package does not generate any code, it just runs the code that you give it, collects the output, and converts the code and the output into markdown. This has no influence on the content of the question, it is just an easy way to copy your code into a question on SO. So I think it adds nothing and is fluff only. However, if the advertising helps other people to learn about the package and write more complete and easier to read questions themselves, then this is a huge advantage, so the attribution can be kept just for that.
    – Marijn
    Commented Jul 5, 2019 at 12:54
  • 2
    @Marijn Everyone thinks advertising their great open source package that is awesome for everything and everyone should use always helps the general public. That, however, is not an appropriate reason to link it in an SO post if there is no other reason for it. By the way, have you tried using jQuery? It's awesome and does all the things.
    – Erik A
    Commented Jul 5, 2019 at 12:57
  • 1
    @ErikA I agree in general - but this is not a package/library that can be used in actual programming, like jQuery. This is a package that helps people write better questions on SO - a SO-specific meta package so to speak. It should be clear from the Ask a Question UI that you are supposed to provide a minimal example, but many people still don't do this, so the UI fails in this respect. Anything that can help improve this situation is welcome, even if it is an advertisement in a question - I know it's against policy but desperate times call for desparate measures.
    – Marijn
    Commented Jul 5, 2019 at 13:04
  • 3
    It's already promoted quite a lot here, for example, in the tag wiki. The jQuery stuff is just because of this. Promoting random stuff in random questions is bad, it's a slippery slope to spam, even if it's to help others ask on SO. If someone posts random unreproducible stuff, feel free to point them to reprex in a comment, though.
    – Erik A
    Commented Jul 5, 2019 at 13:13
-1

While I see the point of this topic, I strongly disagree with some arguments mentioned here. This question seems very specific to R to me and answers might have been somehow influenced by the culture of other languages.

I started using the reprex package because I saw so many nice reproducible examples on StackOverflow and clicked on the link once. This dramatically improved the quality of my questions, as reproducible examples are really important in R (far more than in other languages IMHO).

Therefore, leaving the credits is not about attribution or legal matter, but about telling OP how to easily post a clean reproducible example. If it has any real influence on behavior, questions will be at least a bit nicer to answer.

Also, the date might be somehow important as it gives a hint of which version of the packages was used at the time, without spamming with the full sessionInfo(). Again, this is very R-specific.

However, I might revise my opinion about this meta when all R questions have beautiful reproducible examples, with or without using reprex.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .