Intended to be generic on first two arguments.
apply_right_S4(
pipe_left_arg,
pipe_right_arg,
pipe_environment,
left_arg_name,
pipe_string,
right_arg_name
)
left argument
pipe_right_arg argument
environment to evaluate in
name, if not NULL name of left argument.
character, name of pipe operator.
name, if not NULL name of right argument.
result
a <- data.frame(x = 1)
b <- data.frame(x = 2)
# a %.>% b # will (intentionally) throw
setMethod(
"apply_right_S4",
signature("data.frame", "data.frame"),
function(pipe_left_arg,
pipe_right_arg,
pipe_environment,
left_arg_name,
pipe_string,
right_arg_name) {
rbind(pipe_left_arg, pipe_right_arg)
})
a %.>% b # should equal data.frame(x = c(1, 2))
#> x
#> 1 1
#> 2 2