%>% | R Documentation |
This package uses the pipe operator (%>%
) to express nested code
as a series of imperative procedures.
lhs, rhs |
An object and a function. |
magrittr::%>%()
, tee()
.
# set seed for reproducibility set.seed(500) # generate 100 random numbers and calculate the mean mean(runif(100)) # reset the seed set.seed(500) # repeat the previous procedure but use the pipe operator instead of nesting # function calls inside each other. runif(100) %>% mean()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.