steps.Rd
Steps to be added to either the pipeline steps or spider steps.
formula to be used in the step that accepts the input .x and optional .y parameters
The name of the object
whether or not to flatten the result of the parser
a function to apply to your parser function if you don't want to use purrr::map()
p_mult_2 <- parser( ~ .x * 2, name = "multply by two")
p_mult_2
#> ( 1 ) A parser: multply by two
run(p_mult_2, 1:5)
#> Executing parser multply by two
#> [[1]]
#> [1] 2
#>
#> [[2]]
#> [1] 4
#>
#> [[3]]
#> [1] 6
#>
#> [[4]]
#> [1] 8
#>
#> [[5]]
#> [1] 10
#>
t_sum <- transformer(~ sum(.x), name = "get sum")
t_sum
#> ( 1 ) A transformer: get sum
run(t_sum, 1:5)
#> Executing transformer get sum
#> [1] 15