Pipe operator
This package uses the pipe operator (\%>\%
) to express nested code
as a series of imperative procedures.
lhs, rhs |
An object and a function. |
An object.
# 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()
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.