Eligible outcomes, predictions, probabilities and resampling indices can stay inline or reference compressed Parquet files beside the JSON document. The outer resample structure remains in JSON. Fitted runtime objects are excluded. Move the JSON file and its accompanying directory together.
Arguments
- x
Published S7 report object.
- file
Character: Output JSON path.
- storage
Character:
"inline","parquet", or"auto".- inline_max_bytes
Numeric: In auto mode, maximum estimated uncompressed payload bytes kept inline: eight per numeric value or categorical code, one per Boolean, or UTF-8 string bytes plus eight per string.
- base_dir
Character: Directory resolving existing DataRef paths. Defaults to the output directory.
- overwrite
Logical: Replace an existing JSON file.
Examples
result <- resample(1:6, setup_KFold(n_resamples = 2L), verbosity = 0L)
directory <- tempfile("result-")
dir.create(directory)
write_result(result, file.path(directory, "result.json"), storage = "parquet")
unlink(directory, recursive = TRUE)