Description Usage Arguments Details Examples
Pathways are expressed using a simple language. Given nodes A, B, C, and D:
1 | connect(x)
|
x |
string describing functional pathway |
* 'A' - performs no operations * 'A –> B' := 'h_inode(B) <- A' in the parent frame
Multiple inputs are space delimited
* 'A B –> C' := 'h_inode(C) <- list(A, B)'
Any number of nodes can be chained
* 'A –> B –> C' := 'h_inode(B) <- A; h_inode(C) <- B'
Parentheses can be used to denote branching pathways
* '(A –> B) (C –> D) E' 1. 'h_inode(B) <- A' 2. 'h_inode(D) <- C' 3. 'h_inode(E) <- list(B, D)'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(pied)
library(magrittr)
A <- hwell('a')
B <- hpipe('a -> b')
C <- hpipe('b -> c')
D <- hpipe('b -> c -> d')
h_fun(A) <- function() 'a'
h_fun(B) <- function(x) paste0(x, 'b')
h_fun(C) <- function(x) paste0(x, 'c')
h_fun(D) <- function(x,y) sprintf('(%s)(%s)d', x, y)
connect('(A --> B) (A --> B --> C) --> D')
D()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.