Description Usage Arguments Value Examples
import a single function from a file (instead of getting them all with 'source()')
1 |
what |
function to be imported (*not quoted*) |
from |
path to file that defines 'what' (character) |
msg |
whether to print a message on success ("func X was imported"); defaults to 'TRUE' |
no return value
1 2 3 4 5 6 | # usage example (assumes `boosh()` is defined in "util.r")
import(what=boosh, from="util.r") # `boosh()` gets created in calling env
rm(boosh) # clear `boosh()` from ws
blaowwie <- function(){
import(boosh, from="util.r"); boosh("blah1","blah2")}
blaowwie() # `boosh()` will *not* be created in calling env of `blaowwie()`
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.