Description Usage Arguments Value Examples
Convert a JSON string in memory or a JSON file on disk into a list-of-lists structure.
1 | read_pfa(x)
|
x |
A string, file or url connection |
a list
of lists structure in which null -> NULL, true -> TRUE,
false -> FALSE, numbers -> numeric, strings -> character, array -> list,
object -> named list
1 2 3 4 5 6 7 8 9 | # literal JSON string (useful for small examples)
toy_model <- read_pfa('{"input":"double","output":"double","action":[{"+":["input",10]}]}')
# from a local path, must be wrapped in "file" command to create a connection
local_model <- read_pfa(file(system.file("extdata", "my-model.pfa", package = "aurelius")))
# from a url (split on two lines so not to exceed 100 char wide during install)
url_model <- read_pfa(url(paste0('https://raw.githubusercontent.com/ReportMort/hadrian',
'/feature/add-r-package-structure/aurelius/inst/extdata/my-model.pfa')))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.