# \donttest{
# 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)
# }
# .cff with errors
err_f <- system.file("examples/CITATION_error.cff", package = "cffr")
# Can manipulate the errors as data frame
res <- try(cff_validate(err_f))
isTRUE(res)
isFALSE(res)
attr(res, "errors")
# If a CITATION file (note that is not .cff) it throws an error
try(cff_validate(system.file("CITATION", package = "cffr")))
Run the code above in your browser using DataLab