Skip to content

Commit

Permalink
add example from #2655
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki committed Mar 14, 2020
1 parent 838f00d commit a2b876b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/programming.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,16 @@ substitute2(.(), env=list(a="b", fun="const1", nm="int1"), char.as.name=TRUE)
substitute2(.("TRUE" = 1L, "FALSE" = 2L, "1" = 3L, "2" = 4L),
env=list("FALSE"="col2", "2"="col4"),
char.as.name=TRUE)

substitute2(
.(out_col_name = fun(in_col_name, fun_arg1=fun_arg1val)),
env = list(
in_col_name = "x",
fun = "sum",
fun_arg1 = "na.rm",
fun_arg1val = TRUE,
out_col_name = "sum_x"
),
char.as.name = TRUE
)
#.(sum_x = sum(x, na.rm = TRUE))

0 comments on commit a2b876b

Please sign in to comment.