This function adds a function to a given flow.

step(
  flow,
  f,
  inputs = ifelse(inherits(f, "function"), list(names(formals(f))), list()),
  output,
  ...
)

Arguments

flow

(a flow) The flow where to add a new function

f

(a function) The function itself to be added

inputs

(list) List of the inputs needed for the function to be executed, defaults to the formal arguments of the function, list())

output

(name) The name(s) to assign to the output(s) of the function.

...

extra parameters for the function, allows to parameterize the flow.

Value

The flow with the function added