I am writing an R package and I would like to use one function from another package ( plotKML ). This external package has so many dependencies that I do not want my users to load, etc. If I use importFrom(plotKML, readGPX) in the NAMESPACE file, it will load all plotKML into the namespace and load all the dependencies that I find I don't want.
So, the question arises: is it correct to copy the code for the function that I need (so that all the dependencies in this function are included)? If so, what is appropriate for attribution / documentation - will I copy the documentation from the original?
There is a big discussion on this issue in this post , and Brian Diggs answer is very helpful. But it ends with the words: βFor your example, you might be better off copying the code for memisc :: to describe in your package, although this approach has its problems and caveats,β so I remain with some uncertainty as to which problems and whether it is advisable to attribution point of view.
source share