There are a lot of possible ways to implement this package, to minimize duplication. This is the API we want:
r(fun, args, ...)
r_safe(fun, args, ...)
r_bg(fun, args, ...)
r_bg_safe(fun, args, ...)
rcmd(cmd, cmdargs, ...)
rcmd_safe(cmd, cmdargs, ...)
rcmd_bg(cmd, cmdargs, ...)
rcmd_bg_safe(cmd, cmdargs ...)
The _safe
versions are easy to deal with, they just call the non-_safe
versions with different arguments.
For the other versions, this is what they need to do:
r
r_bg
rcmd
rcmd_bg
check_my_args
:r
and r_bg
, setup_script_files
:setup_context
:This is run with .
as the working directory for r
and r_bg
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.