powered by
Convert a PFA list of lists into a JSON string in memory or a JSON file on disk.
write_pfa(doc, file = "", force = TRUE, auto_unbox = TRUE, pretty = FALSE, digits = 8, ...)
The document to convert.
a string representing file path to write to. If '' then the string of JSON is returned
a logical indicating to unclass/skip objects of classes with no defined JSON mapping
a logical indicating to automatically unbox all atomic vectors of length 1
a logical indicating to add indentation whitespace to JSON output.
max number of decimal digits to print for numeric values. Use I() to specify significant digits. Use NA for max precision.
additional arguments passed to toJSON
my_pfa_doc <- pfa_document(avro_double, avro_double, expression(input + 10)) write_pfa(my_pfa_doc) write_pfa(my_pfa_doc, file = "my-model.pfa")
Run the code above in your browser using DataLab