Description Usage Arguments Details Value See Also Examples
json2env
parses arguments in javascript object notation (JSON) and
loads them into an environment (typically that of the enclosing function).
1 | json2env(json_args, replace = T, envir = parent.frame())
|
json_args |
JSON-formatted name-value pairs to be converted. |
replace |
Boolean indicating if provided JSON arguments take priority over formals of the same name. If TRUE, JSON arguments replace the values of formals of the same name (default). If FALSE, JSON arguments are ignored when a formal of the same name is declared. |
envir |
The environment JSON arguments are to be loaded into. Defaults
to the environment of the calling function ( |
json2env
loads JSON formatted name-value pairs into an environment
(parent.frame
of the calling environment by default). This is
particularly useful in web applications where it is desireable for a function
to receive arguments in JSON format.
Note that json2env
does not have a return value and so does
not need to be assigned (<-
). Rather the side effect of json2env
is being used to assign names with values to an environment.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.