orbital_json_write {orbital}R Documentation

Save orbital object as json file

Description

Saving an orbital object to disk in a human and machine readable way.

Usage

orbital_json_write(x, path)

Arguments

x

An orbital object.

path

file on disk.

Details

The structure of the resulting JSON file allows for easy reading, both by orbital itself with orbital_json_read(), but potentially by other packages and langauges. The file is versioned by the version field to allow for changes why being backwards combatible with older file versions.

Value

Nothing.

See Also

orbital_json_read()

Examples


library(workflows)
library(recipes)
library(parsnip)

rec_spec <- recipe(mpg ~ ., data = mtcars) %>%
  step_normalize(all_numeric_predictors())

lm_spec <- linear_reg()

wf_spec <- workflow(rec_spec, lm_spec)

wf_fit <- fit(wf_spec, mtcars)

orbital_obj <- orbital(wf_fit)

tmp_file <- tempfile()

orbital_json_write(orbital_obj, tmp_file)

readLines(tmp_file)


[Package orbital version 0.2.0 Index]