cff_validate {cffr}R Documentation

Validate a CITATION.cff file or a cff object

Description

Validate a CITATION.cff file or a cff object created with cff_create() using the corresponding validation schema.json.

Usage

cff_validate(x = "CITATION.cff", verbose = TRUE)

Arguments

x

This is expected to be either a cff object created with cff_create() or the path to a CITATION.cff file to be validated.

verbose

Logical TRUE/FALSE. On TRUE the function would display informative messages.

Value

A message indicating the result of the validation and an invisible value TRUE/FALSE.

See Also

Guide to Citation File Format schema version 1.2.0.

Other core functions: cff_create(), cff_write(), cff()

Examples


# Full .cff example
cff_validate(system.file("examples/CITATION_complete.cff", package = "cffr"))

# Validate a cffr object
cffr <- cff_create("jsonlite")
class(cffr)
cff_validate(cffr)

## Not run: 
# .cff with errors
cff_validate(system.file("examples/CITATION_error.cff", package = "cffr"))
# If a CITATION file (note that is not .cff) it throws an error
cff_validate(system.file("CITATION", package = "cffr"))

## End(Not run)

[Package cffr version 0.2.0 Index]