View source: R/assets-to_json.R
to_json | R Documentation |
It supports csv and json by default and lets users provide custom handlers if other file formats are used.
to_json(input, as_data_frame, read_fun, ...)
input |
A character string; the path to the input file. |
as_data_frame |
TRUE or FALSE; whether the data are loaded as a data-frame. |
read_fun |
A function to load the input file. Default settings are provided for CSV files and JSON files. The function has to load a data file into an object that can be handled by 'jsonlite::toJSON'. Possible choices include 'utils::read_delim', 'readr::read_csv2', etc. |
... |
Extra arguments to be passed to 'read_fun'. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.