conditionally apply a pipe
Arguments
- df
dataframe to apply funct to if cond TRUE
- cond
condition whether to run func, not vectorised (should be a single logical)
- func
function to run
Examples
#data.frame(a=c(1:5)) |>
# pipe_if(TRUE, \(d) d |>
# mutate(b=a*2))