Description Usage Arguments Details
Use this function to create functions that call node.js module commands. The
returned function will take arguments in the form of argument=value
that
are passed to the node module CLI as --argument=value
.
1 2 3 | node_fn(node_package, node_cmd = "", node_bin = node_package,
r_package = environmentName(parent.frame()), node_dir = "node",
return_list = TRUE, ...)
|
node_package |
the directory name of the node package |
node_bin |
the 'bin' command of the node package. Defaults to the package name |
node_dir |
the directory where node packages are kept. Defaults to 'node', which should be a directory under 'inst' when creaing your own package. |
node_cmd |
Optional. Command argument following the node binary, e.g., "init" in "dat init". |
r_package |
the package name which wraps the function. Defaults to the
parent.frame, assuming that |
return_list |
If |
... |
Additional parameters to pass to system2 if
|
The function will retrun a list comprised of output
(0/1 for success/
failure), stdout
, and stderr
from the node command.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.