Export bitfield registries in DataCite-compliant formats for archiving, sharing, and integration with metadata repositories.
bf_export(registry, format, file = NULL)
registry(1)
Registry object to export.
character(1)
Export format. One of "json",
"xml", "yaml", or "rds".
character(1)
Optional file path to write the
output. If NULL, returns the formatted data.
Exported data as character string for formatted outputs, or the
registry object for "rds" format. If file
is specified, returns
invisibly and writes to file.
if (FALSE) { # \dontrun{
# Create registry with metadata
auth <- person("Jane", "Smith", email = "jane@example.com",
comment = c(ORCID = "0000-0000-0000-0000"))
reg <- bf_registry(name = "analysis",
description = "Data quality assessment",
author = auth)
# Export to different formats
bf_export(registry = reg, format = "json", file = "metadata.json")
bf_export(registry = reg, format = "xml", file = "metadata.xml")
yaml_output <- bf_export(registry = reg, format = "yaml")
} # }