# Piping to a non-first argument
mtcars |>
transform(kmL = mpg / 2.35) |>
bind(d, lm(kmL ~ hp, data = d))
# Using the piped value multiple times
rnorm(10, mean = 10) |>
bind(x, x - mean(x))
# Using the piped value in multiple arguments
c(a = 1, b = 2, c = 3) |>
bind(x, paste(names(x), x, sep = " = "))
# Subsetting the piped value
mtcars |>
bind(d, d$mpg)
Run the code above in your browser using DataLab