Description Usage Arguments Details Examples
These operators all return the same as magrittr's pipe operator but have additional side effects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | lhs %W>% rhs
lhs %G>% rhs
lhs %S>% rhs
lhs %P>% rhs
lhs %D>% rhs
lhs %V>% rhs
lhs %L>% rhs
lhs %C>% rhs
lhs %strict>% rhs
|
lhs |
A value or the magrittr placeholder. |
rhs |
A function call using the magrittr semantics. |
silence warnings
fail on warning
uses View()
on the output
logs the relevant call to the console
uses print()
on the output
prints the summary()
off the output
uses tibble::glimpse
on the output
debugs the pipe chain at the relevant step
clocks the relevant step
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # silence a warning
data.frame(a= c(1,-1)) %W>% transform(a=sqrt(a))
# view stepps of chain in the viewer
iris %V>% head(2) %V>% `[`(4:5)
# log steps in the console
iris %L>% {Sys.sleep(1);head(.,2)} %L>% {Sys.sleep(2);.[4:5]}
# use print, summary or glimpse on output
iris %P>% head(2) %P>% `[`(4:5)
iris %S>% head(2) %S>% `[`(4:5)
iris %G>% head(2) %G>% `[`(4:5)
# debug the chain
iris %>% head(2) %D>% `[`(4:5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.