import_objs | R Documentation |
Statically import specific objects
import_objs(
names,
source = system.file("staticexports", package = "staticimports"),
outfile = here::here("R/staticimports.R"),
label = NULL,
append = FALSE
)
names |
A character vector of names of objects to import. |
source |
A directory containing source files, or an environment to use as the source. |
outfile |
File to write to. Defaults to R/staticimports.R in the current
project. Use |
label |
A label to write to the file, to indicate where the objects were imported from. |
append |
If |
if (interactive()) {
# Import `os_name` and `walk` into your project
import_objs(c("os_name", "walk"))
}
# Write to stdout instead of R/staticimports.R
import_objs(c("os_name", "walk"), outfile = stdout())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.