DataFramesMeta question

There is no special case for this. There is no equivalent to Stata’s _N or dplyr’s n().

You can do

@combine df $nrow

But that kind of thing can’t be used inside transformations, so you can’t do

@combine df :y = :x / $nrow

I would only use

@combine df $nrow

if you really know what you are doing and exactly how DataFramesMeta.jl translates expressions to actually DataFrames.jl calls.

So stick to length for now.

1 Like