Description Usage Arguments Details Value References See Also Examples
Citation File Format (cff) reader
1 | cff_reader(x)
|
x |
(character) a file path or a yaml string |
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:
each reference must have the 3 required fields: type, authors, title
type must be in the allowed set, see cff_reference_types
the elements within authors must each be an entity or person object https://github.com/citation-file-format/citation-file-format#entity-objects https://github.com/citation-file-format/citation-file-format#person-objects
title must be a string
an object of class handl
; see handl for more
CFF format: https://github.com/citation-file-format/citation-file-format
Other readers:
bibtex_reader()
,
citeproc_reader()
,
codemeta_reader()
,
ris_reader()
Other cff:
cff_writer()
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.