zoonproject / zoon

The zoon R package
Other
61 stars 13 forks source link

add a module citation function #271

Closed goldingn closed 8 years ago

goldingn commented 8 years ago

R provides citation() to help users cite packages (and help package maintainers get cited). E.g.:

citation('spocc')

To cite package ‘spocc’ in publications use:

  Scott Chamberlain, Karthik Ram and Ted Hart (2016). spocc: Interface
  to Species Occurrence Data Sources. R package version 0.4.5.
  https://CRAN.R-project.org/package=spocc

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {spocc: Interface to Species Occurrence Data Sources},
    author = {Scott Chamberlain and Karthik Ram and Ted Hart},
    year = {2016},
    note = {R package version 0.4.5},
    url = {https://CRAN.R-project.org/package=spocc},
  }

We'd like modules to be cited, so a function to help with that would be great. citation() uses the package DESCRIPTION file, we'd probably have to scrape the module helpfile from the repo. Presumably this could use the same code as for the website @AugustT?

I had initially though we could overload citation() directly, but A) it's not class specific, so users would get a warning saying it was using ours, not the one in utils and B) there would probably be name conflicts between modules and packages.

Instead we could define function ZoonCitation() or similar with results like this:

ZoonCitation('BiomodModel')

  ZOON Developers (2015). BiomodModel. ZOON module version 1.0.
  https://zoonproject.org/module=BiomodModel

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {BiomodModel},
    author = {{ZOON Developers}},
    year = {2015},
    note = {ZOON module version 1.0},
    url = {https://zoonproject.org/module=BiomodModel},
  }

Some support for citing the specific version used would be helpful too.

Some way of extracting citations for all of the modules used in a workflow would then be useful (and easy to do)

timcdlucas commented 8 years ago

+1

goldingn commented 8 years ago

I'm guessing this depends on #284 to some extent, since we'll need to parse the roxygen block to get these data

AugustT commented 8 years ago

https://github.com/zoonproject/zoon/pull/295/commits/0b95b870c5a93874ff3a721293cfabbbac67e811

goldingn commented 8 years ago
ZoonCitation('PrintMap')
To cite the PrintMap module in publications use:

ZOON Developers, James Campbell (2016). Output module: PrintMap. Zoon module version: 1.1. Available at: https://raw.githubusercontent.com/zoonproject/modules/master/R/PrintMap.R

A BibTeX entry for LaTeX users is:

@Manual{
   title = {Output module: PrintMap}
   author = {ZOON Developers and James Campbell}
   year = {2016}
   note = {Zoon module version: 1.1}
   url = {https://raw.githubusercontent.com/zoonproject/modules/master/R/PrintMap.R}
 }

perfect!

AugustT commented 8 years ago

Note that we will probably want to change the URL in the future once the website is finalised.