Skip to contents

The function prints or returns the citation string of a chosen object/item.

Usage

reference(
  src,
  bibtex = FALSE,
  ser = NULL,
  ver = NULL,
  print = TRUE,
  prefix = ""
)

Arguments

src

(characater) Object downloaded with fetch or the source identifier string.

bibtex

(logical) Should a bibtex be printed/returned?

ser

(character) In case src is character, the series identifier.

ver

(character) In case src is character, the version identifier.

print

(logical) Should the citations be printed to the console, or returned as a character vector.

prefix

(characater) In case the output is printed on the console. Use this to include a prefix before every entry.

Value

By default the function has no return value. If print=FALSE, the function will return a reference character string.

Examples

# A locally-present object, in package's directory
one <- fetch(src="SOM-zaffos-fragmentation",
  datadir=system.file("extdata", package="chronosphere"))
#> 
#> ------------------------------------------------------------
#> Accessing chronosphere registry tables.
#> ------------------------------------------------------------
#> Found downloaded registry tables.
#> 
#> ------------------------------------------------------------
#> Item no. 23, src:SOM-zaffos-fragmentation, ser: fragment, ver: 20170424, res: 1my.
#> ------------------------------------------------------------
#> 
#> ------------------------------------------------------------
#> Loading downloaded import code.
#> ------------------------------------------------------------
#> 
#> ------------------------------------------------------------
#> Loading downloaded data file.
#> ------------------------------------------------------------
#> 
#> If you use the data in publications, please cite its
#> reference(s), as well as that of the 'chronosphere' project.
#> Zaffos, A., Finnegan, S., & Peters, S. E. (2017). Plate tectonic regulation of global marine animal diversity. Proceedings of the National Academy of Sciences, 114(22), Article 22. https://doi.org/10.1073/pnas.1702297114
# its reference
reference(one)
#> Zaffos, A., Finnegan, S., & Peters, S. E. (2017). Plate tectonic regulation of global marine animal diversity. Proceedings of the National Academy of Sciences, 114(22), Article 22. https://doi.org/10.1073/pnas.1702297114