Description Usage Arguments Details Value See Also Examples
Create a moduleSource
object for use in a module
's sources
list.
1 | moduleSource(vessel, order = NULL)
|
vessel |
|
order |
numeric value specifying source position in sources |
The contents of a module's source script are provided by
the vessel
object. For inline code use a scriptVessel
object. For a script file on the local filesystem use
fileVessel
.
vessel
cannot be an inputVessel
object, as these are not
defined for moduleIO objects.
module
sources are exectuted in the order determined by each
source's ‘order’.
Running order is:
negative numbers in ascending order
zero
no order specified
positive numbers in ascending order
named moduleSource
list containing:
vessel: vessel
object
order: numeric value determining position of source in sources
module
, fileVessel
, scriptVessel
1 2 3 4 5 6 7 8 9 | ## create moduleSource with source script inline
val1 <- c("x <- 1:10", "y <- rnorm(10, 0, 1)", "plot(x, y)")
src1 <- moduleSource(vessel = scriptVessel(value = val1),
order = -1)
## create a moduleSource with source script from file
modScript <- system.file("extdata", "simpleGraphScripts", "createGraph.R",
package = "conduit")
src2 <- moduleSource(vessel = fileVessel(ref = modScript))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.