1

I am creating a package called rmetadata here. The purpose of the package is to make requests to the OAI-PMH services of many data sources on scholarly publications/metadata. I wrote other packages (rpmc, rdatacite, etc.) that have functions named the same thing to be consistent as they do the same thing in each package, but for different data sources.

On installing rmetadata

install_github('rmetadata', 'ropensci')
library(rmetadata)

I get many warnings like

Warning: replacing previous import 'identify' when loading 'rdryad'
Warning: replacing previous import 'listidentifiers' when loading 'rdryad'
Warning: replacing previous import 'listmetadataformats' when loading 'rdryad'

What should I do? Should I rename the functions within each of the packages that rmetadata calls? e.g., identify becomes dryad_identify in rdryad, and identify becomes datacite_identify in rdatacite.

Or something else?

Bart
  • 19,692
  • 7
  • 68
  • 77
sckott
  • 5,755
  • 2
  • 26
  • 42
  • Is there a way you can break off all the similarly named functions and create another package of them that can give different outputs depending on what is supplied to them. In this way you'll be doing less copying and pasting of code, being more generalizable with your functions and avoid the problem you're now facing. – Tyler Rinker Sep 03 '12 at 17:08
  • @TylerRinker Thanks for the feedback. Gotta think about that for a bit. – sckott Sep 03 '12 at 17:58
  • These could all go in `ropensci_Toolkit` (or at least that's been the idea all along). – Maiasaura Sep 03 '12 at 18:23
  • Could you use S3 methods to sort this problem out? Then the functions with the same name won't collide with each other and the main function will figure out what actual method to use based on the input. – Dason Oct 14 '12 at 03:55
  • True, good point, thanks for the help – sckott Oct 14 '12 at 06:33

0 Answers0