write_airr {airr} | R Documentation |
Write AIRR Data Model records to YAML or JSON files
Description
write_airr
writes a YAML or JSON file containing AIRR Data Model records.
Usage
write_airr(
data,
file,
format = c("auto", "yaml", "json"),
validate = TRUE,
model = TRUE
)
Arguments
data |
|
file |
output file name. |
format |
format of the output file. Must be one of |
validate |
run schema validation prior to write if |
model |
if |
See Also
See Schema for the AIRR schema definition objects. See read_airr for reading to AIRR Data Model files.
Examples
# Get path to the repertoire-example file
file <- system.file("extdata", "repertoire-example.yaml", package="airr")
# Load data file
repertoire <- read_airr(file)
# Write a Rearrangement data file
outfile <- file.path(tempdir(), "output.yaml")
write_airr(repertoire, outfile)
[Package airr version 1.5.0 Index]