apply_right_S4: S4 dispatch method for apply_right.

Description Usage Arguments Value See Also Examples

View source: R/bpipe.R

Description

Intended to be generic on first two arguments.

Usage

1
2
3
4
5
6
7
8
apply_right_S4(
  pipe_left_arg,
  pipe_right_arg,
  pipe_environment,
  left_arg_name,
  pipe_string,
  right_arg_name
)

Arguments

pipe_left_arg

left argument

pipe_right_arg

pipe_right_arg argument

pipe_environment

environment to evaluate in

left_arg_name

name, if not NULL name of left argument.

pipe_string

character, name of pipe operator.

right_arg_name

name, if not NULL name of right argument.

Value

result

See Also

apply_left, apply_right

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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))

WinVector/wrapr documentation built on Nov. 21, 2020, 8:31 p.m.