Import a predx-formatted JSON file as a predx data frame

import_json(file)

Arguments

json_file

Value

A predx data frame.

Examples

predx_demo <- as.predx_df(list( location = c('Mercury', 'Venus', 'Earth'), target = 'habitability', predx = list(Binary(1e-4), Binary(1e-4), Binary(1)) )) json_tempfile <- tempfile() export_json(predx_demo, json_tempfile) import_json(json_tempfile)
#> # A tibble: 3 x 4 #> location target predx_class predx #> <chr> <chr> <chr> <list> #> 1 Mercury habitability Binary <Binary> #> 2 Venus habitability Binary <Binary> #> 3 Earth habitability Binary <Binary>