Wrapper for jsonlite::write_json. Enforces that the input object is an RO-Crate.
write_rocrate(x, path, ...)Invisibly the input RO-Crate, x.
RO-Crate object, see rocrate.
file on disk
Arguments passed on to jsonlite::toJSON
dataframehow to encode data.frame objects: must be one of 'rows', 'columns' or 'values'
matrixhow to encode matrices and higher dimensional arrays: must be one of 'rowmajor' or 'columnmajor'.
Datehow to encode Date objects: must be one of 'ISO8601' or 'epoch'
POSIXthow to encode POSIXt (datetime) objects: must be one of 'string', 'ISO8601', 'epoch' or 'mongo'
factorhow to encode factor objects: must be one of 'string' or 'integer'
complexhow to encode complex numbers: must be one of 'string' or 'list'
rawhow to encode raw objects: must be one of 'base64', 'hex' or 'mongo'
nullhow to encode NULL values within a list: must be one of 'null' or 'list'
nahow to print NA values: must be one of 'null' or 'string'. Defaults are class specific
digitsmax number of decimal digits to print for numeric values. Use I() to specify significant digits. Use NA for max precision.
forceunclass/skip objects of classes with no defined JSON mapping