cff_reader: Citation File Format (cff) reader

Description Usage Arguments Details Value References See Also Examples

View source: R/cff_reader.R

Description

Citation File Format (cff) reader

Usage

1

Arguments

x

(character) a file path or a yaml string

Details

CFF only supports one citation, so many will always be FALSE.

Required fields: cff-version, version, message, date-released, title, authors. We'll stop with error if any of these are missing

You can though have many references in your CFF file associated with the citation. references is an optional component in cff files. If included, we check the following:

Value

an object of class handl; see handl for more

References

CFF format: https://github.com/citation-file-format/citation-file-format

See Also

Other readers: bibtex_reader(), citeproc_reader(), codemeta_reader(), ris_reader()

Other cff: cff_writer()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
(z <- system.file('extdata/citation.cff', package = "handlr"))
res <- cff_reader(x = z)
res
res$cff_version
res$software_version
res$message
res$id
res$doi
res$title
res$author
res$references

# no references
(z <- system.file('extdata/citation-norefs.cff', package = "handlr"))
out <- cff_reader(x = z)
out
out$references

handlr documentation built on Jan. 13, 2021, 7:27 a.m.