I want to write an R package and release on CRAN. But I have concerns about legal issues: licensing and authorship/ownership.

Code of some functions in the package will be derived from or based on posts in websites like these:

A. this answer and this code for function 1;
B. this comment for several other functions.

What authors/contributors should I include in my R package as I only know nicknames of people who wrote the posts?

A related question about what license this code comes under is here.

  • btw, I am from European Union, if this helps to answer the question.
    – GegznaV
    Commented Jun 8, 2016 at 22:24
  • Their is nothing relevant in the copyright act about citing where you got the code from. Commented Jun 30, 2016 at 22:25

1 Answer 1


Your question is:
How do I attribute authors if I don't know their real names?

I think this has wider applicability to just this case, so I'll attempt to answer with future visitors in mind. I'm also intentionally avoiding the issue of licensing but just focusing on author attribution.

The first thing I would do in this case - although not necessarily required - is contact the author if possible, and ask how they would like to be attributed. Some may be happy to give you their full name, others may prefer their nickname, or others may even be happy to say 'do whatever you like!'.

(When I post code snippets I've written, I'm always happy for it to be used in any way, but if people want to attribute me then that's awesome. I know many other SE users (not everybody though!) apply a similar attitude to their posts)

If you can't contact the authors or don't hear back from them, then - assuming you already have the implicit permission to use the code - I would attribute them based on their nickname, and include their profile URL.

This is still a suitable default method of attribution, as it unambiguously identifies the person (maybe even more so than their full name on its own, actually!). In the case of StackExchange, including the user URL is part of the attribution guidelines (point 4) when including SE content on another website, and in any case, it allows a future user of the code to see who was behind it, easily locate the context of it, and possibly even contact the user. This would be suitable for both your StackOverflow and GitHub examples.

Of course, if a user then contacted you later and asked you to change the way you're attributing them, then you should follow that.

  • 1
    you addressed my concerns. I thought that I should contact some people before I asked the question. But I only found an email address of one person. Now I see, that there are more possibilities.
    – GegznaV
    Commented Jun 15, 2016 at 15:09
  • How much are you taking, there is the concept of fair use. And if it is in a programming manual, or question and answer web site, then this is educating you, and it is fair to use it. But not to create another manual or question/answer book/website. Commented Jun 30, 2016 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.