Hello! I am currently in the process of creating (my first) package, which (when ready) I intend to publish to CRAN. In the process of creating this package I have taken some code form existing packages. I have actually copied parts of functions in to new functions. This code is usually something very basic such as Rand index. What is the proper procedure for this? Since most of R (and also the packages I have taken code form) is published under GPL, I think this should be OK. However I do not know if: 1. I should still ask authors of the packages for permission or at least notify them. 2. Ad references to the functions (and packages) from which I had taken the code or only to the references they use. What about regarding code that was sent to the list, usually as a response to one of my problems. I assume that in this case it is best to consult the author? Any comments and opinions are very welcomed! Best regards, Ales Ziberna
On 1/13/2006 2:04 AM, Ales Ziberna wrote:> Hello! > > I am currently in the process of creating (my first) package, which (when > ready) I intend to publish to CRAN. In the process of creating this package > I have taken some code form existing packages. I have actually copied parts > of functions in to new functions. This code is usually something very basic > such as Rand index. What is the proper procedure for this? > > Since most of R (and also the packages I have taken code form) is published > under GPL, I think this should be OK. However I do not know if: > 1. I should still ask authors of the packages for permission or at > least notify them.It is polite to notify them.> 2. Ad references to the functions (and packages) from which I had taken > the code or only to the references they use.The GPL requires that you maintain their copyright notices. You have the right to use their work, the GPL doesn't give you ownership of it. The usual way to do this is to leave their copyright notice intact, and add your own if you have made modifications. An alternative which is usually (but not always) better is to say that your package depends on theirs, and then just use their functions. The advantage is that it avoids any of the above mixed copyright issues, and it makes sure that when the author fixes a bug, you benefit too. The disadvantage is that it makes your package dependent on theirs, so if changes are needed in it for some future version of R, you'll have to wait for the other maintainer to do them (or copy their code at that point). (I'm a little sensitive about dependencies now, since the LaTeX seminar template I've used a few times no longer works. It depends on too many LaTeX packages, and someone, somewhere has introduced incompatibilities in them. Seems like I'll be forced to use Powerpoint or Impress.) Duncan Murdoch> > What about regarding code that was sent to the list, usually as a response > to one of my problems. I assume that in this case it is best to consult the > author?> Any comments and opinions are very welcomed! > > Best regards, > Ales Ziberna > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
I usually place in my mypackage-package.Rd file a pointer to the existence of a THANKS file and then put the THANKS file in the inst directory (which gets copied to the top level directory by the build tools during the build). For example, after installing dyn try: library(dyn) package?dyn for instructions on accessing the THANKS file from within R. On 1/13/06, Ales Ziberna <aleszib at gmail.com> wrote:> Hello! > > I am currently in the process of creating (my first) package, which (when > ready) I intend to publish to CRAN. In the process of creating this package > I have taken some code form existing packages. I have actually copied parts > of functions in to new functions. This code is usually something very basic > such as Rand index. What is the proper procedure for this? > > Since most of R (and also the packages I have taken code form) is published > under GPL, I think this should be OK. However I do not know if: > 1. I should still ask authors of the packages for permission or at > least notify them. > 2. Ad references to the functions (and packages) from which I had taken > the code or only to the references they use. > > What about regarding code that was sent to the list, usually as a response > to one of my problems. I assume that in this case it is best to consult the > author? > > Any comments and opinions are very welcomed! > > Best regards, > Ales Ziberna > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
On Fri, 13 Jan 2006, Ales Ziberna wrote:> I am currently in the process of creating (my first) package, which (when > ready) I intend to publish to CRAN. In the process of creating this package > I have taken some code form existing packages. I have actually copied parts > of functions in to new functions. This code is usually something very basic > such as Rand index. What is the proper procedure for this?Why not simply specify that their package is a dependency and use their code directly?