cff {cffr} | R Documentation |
Create cff
objects from direct inputs
Description
A class and utility methods for reading, creating and holding CFF
information. See cff_class to learn more about cff
objects.
Usage
cff(path, ...)
Arguments
path |
|
... |
Named arguments to be used for creating a |
Details
cff()
would convert _
in the name of the argument to -
, e.g.
cff_version = "1.2.0'
would be converted to cff-version = "1.2.0'
.
Valid parameters are those specified on cff_schema_keys()
:
-
cff-version
-
message
-
type
-
license
-
title
-
version
-
doi
-
identifiers
-
abstract
-
authors
-
preferred-citation
-
repository
-
repository-artifact
-
repository-code
-
commit
-
url
-
date-released
-
contact
-
keywords
-
references
-
license-url
Value
A cff
object. Under the hood, a cff
object is a regular list
object with a special print
method.
See Also
Other core functions of cffr:
cff_create()
,
cff_modify()
,
cff_validate()
Examples
# Blank cff
cff()
# Use custom params
test <- cff(
title = "Manipulating files",
keywords = c("A", "new", "list", "of", "keywords"),
authors = as_cff_person("New author")
)
test
# Would fail
cff_validate(test)
# Modify with cff_create
new <- cff_create(test, keys = list(
"cff_version" = "1.2.0",
message = "A blank file"
))
new
# Would pass
cff_validate(new)