Pipe an object forward into a function or call expression.
Author
Nathan Eastwood nathan.eastwood@icloud.com and Antoine Fabri antoine.fabri@gmail.com. The code was obtained from poorman package at https://github.com/nathaneastwood/poorman/blob/master/R/pipe.R
Examples
if (interactive() && requireNamespace("EBImage")) {
library(pliman)
# Basic use:
iris %>% head()
# use to apply several functions to an image
img <- image_pliman("la_leaves.jpg")
img %>%
image_resize(50) %>% # resize to 50% of the original size
object_isolate(id = 1) %>% # isolate object 1
image_filter() %>% # apply a median filter
plot() # plot
}