| cff_modify {cffr} | R Documentation |
Modify a cff object
Description
Add new keys or modify existing ones on a cff object.
Usage
cff_modify(x, ...)
Arguments
x |
A |
... |
Named arguments to be used for modifying |
Details
Keys provided in ... would override the corresponding key in x.
It is possible to add additional keys not detected by cff_create() using
the keys argument. A list of valid keys can be retrieved with
cff_schema_keys(). Please refer to
Guide to Citation File Format schema version 1.2.0.
for additional details.
Value
A cff object.
See Also
This function is wrapper of utils::modifyList().
See cff() for creating cff objects from scratch.
Other core functions of cffr:
cff(),
cff_create(),
cff_validate()
Examples
x <- cff()
x
cff_validate(x)
x_mod <- cff_modify(x,
contact = as_cff_person("A contact"),
message = "This overwrites fields",
title = "New Title",
abstract = "New abstract",
doi = "10.21105/joss.03900"
)
x_mod
cff_validate(x_mod)
[Package cffr version 1.1.0 Index]