← Back to all sparks
M

mutagen

ANALYTICS
Velocity0.0

Extensions to dplyrs mutate

A young package porting Stata's egen row-wise helpers to the tidyverse, one function per release

data-manipulationtidyversestata-portr-packageearly-stage
Current state
mutagen provides row-wise column-generation helpers for R data frames in the spirit of Stata's egen — gen_rowmean(), gen_rowsum(), gen_rowsd(), gen_rownonmiss() and about a dozen siblings. It reached 0.5.0 within three months of its first release, adding two or three functions each time. The most recent release adds gen_coldiff() and renames two functions to fit the naming scheme.
Where it's heading
The package is filling out a known surface rather than discovering one: the reference implementation exists in Stata, so development is a matter of working through the list. Alongside that, the naming convention is still settling — gen_rowmatch became gen_rowany, gen_percent became gen_colpercent, gen_na_listcol became gen_listcol_na — which is normal for a pre-1.0 package but means callers should expect further renames. Contributions are arriving from several first-time contributors.
Prediction
The gen_col* prefix has only two members against a dozen gen_row* functions, so column-wise coverage is the obvious gap; expect it to fill before the naming stabilises for a 1.0.

Recent moves

  1. 8mo ago

    gen_coldiff() added; two functions renamed for consistency

    Adds gen_coldiff() and renames gen_na_listcol() to gen_listcol_na() and gen_percent() to gen_colpercent(). The renames signal the row/column prefix convention firming up ahead of a stable release.

    View source ↗
  2. 9mo ago

    gen_rowsum() and gen_rowsd() added

    Two more row-wise summaries, continuing the steady coverage of the egen surface.

    View source ↗
  3. 9mo ago

    gen_rownonmiss() and gen_rowall() added

    Adds a non-missing count and an all-true predicate across columns, filling out the missingness and logical corners of the row-wise set.

    View source ↗
  4. 9mo ago

    Row mean, median and missingness helpers; gen_rowmatch renamed

    Adds gen_rowmean(), gen_rowmedian(), gen_rowmiss() and gen_percent(), renames gen_rowmatch() to gen_rowany(), and wires up the R-hub v2 workflow. The largest functional release after the initial one.

    View source ↗
  5. 11mo ago

    First release with the row-wise gen_* family

    The initial release, shipping gen_rowmax(), gen_rowmin(), gen_rownth(), gen_rowfirst(), gen_rowlast(), gen_rowmatch(), gen_rowcount() and gen_na_listcol(), plus project scaffolding. Establishes both the scope and the naming scheme the following releases refine.

    View source ↗