cff_modify: Modify a 'cff' object

View source: R/cff-modify.R

cff_modifyR Documentation

Modify a cff object

Description

Add new keys to a cff object or modify existing ones.

Usage

cff_modify(x, ...)

Arguments

x

A cff object.

...

Named arguments used to modify x. See also the ... argument in cff().

Details

Keys provided in ... override the corresponding key in x.

You can add additional keys not detected by cff_create() using the keys argument. A list of valid keys can be retrieved with cff_schema_keys(). See the following guide for additional details: Citation File Format schema guide.

Value

A cff object.

See Also

This function is a wrapper of utils::modifyList().

Core cffr workflow: cff(), cff_create(), cff_validate(), cff_write()

Examples

x <- cff()
x

cff_validate(x)

x_mod <- cff_modify(x,
  contact = as_cff_person("A contact"),
  message = "This overwrites keys",
  title = "New Title",
  abstract = "New abstract",
  doi = "10.21105/joss.03900"
)

x_mod

cff_validate(x_mod)


cffr documentation built on Aug. 24, 2026, 5:11 p.m.