View source: R/write_dataset_json.R
write_dataset_json | R Documentation |
Write out a Dataset JSON file
write_dataset_json(
x,
file,
pretty = FALSE,
float_as_decimals = FALSE,
digits = 16
)
x |
datasetjson object |
file |
File path to save Dataset JSON file |
pretty |
If TRUE, write with readable formatting. Note: The Dataset JSON standard prefers compressed formatting without line feeds. It is not recommended you use pretty printing for submission purposes. |
float_as_decimals |
If TRUE, Convert float variables to "decimal" data
type in the JSON output. This will manually convert the numeric values
using the |
digits |
When using |
NULL when file written to disk, otherwise character string
# Write to character object
ds_json <- dataset_json(
iris,
item_oid = "IG.IRIS",
name = "IRIS",
dataset_label = "Iris",
columns = iris_items
)
js <- write_dataset_json(ds_json)
# Write to disk
## Not run:
write_dataset_json(ds_json, "path/to/file.json")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.