partition_mutate_se: Partition a sequence of mutate commands into longest ordered...

View source: R/stmtPlanner.R

partition_mutate_seR Documentation

Partition a sequence of mutate commands into longest ordered no create/use blocks.

Description

We assume the sequence of expressions is in a valid order (all items available before use). This function partitions the expressions into ordered longest "no new value used blocks" by greedily scanning forward remaining expressions in order taking any that: have all their values available from earlier groups, do not use a value formed in the current group, and do not overwrite a value formed in the current group. For an example please see https://winvector.github.io/FluidData/partition_mutate.html.

Usage

partition_mutate_se(exprs)

Arguments

exprs

list of source-text of a sequence of mutate expressions.

Value

ordered list of mutate_se assignment blocks

Examples


partition_mutate_se(c("a1" := "1", "b1" := "a1", "a2" := "2", "b2" := "a1 + a2"))


WinVector/seplyr documentation built on Aug. 26, 2022, 12:01 p.m.